HDAlertViewButtonsListStyle属性设置失败
wangzzcloud opened this issue · comments
_alert = [HDAlertView showAlertViewWithTitle:nil message:@"报表关联" cancelButtonTitle:nil otherButtonTitles:@[@"第一",@"第二",] handler:^(HDAlertView *alertView, NSInteger buttonIndex) {
NSLog(@"%ld", buttonIndex);
}];
_alert.defaultButtonTitleColor = [UIColor blackColor];
_alert.buttonsListStyle = HDAlertViewButtonsListStyleRows;
[_alert show];
原因:在设置按钮格式前已经按默认的HDAlertViewButtonsListStyleNormal初始化布局完成,设置无效
看看Demo怎么创建的吧。或者在内部创建的时候设置相对应的属性。创建之后最好只控制点击事件问题。如果是Demo代码这个快捷方式内部已经show。再调就不会多次生效的。避免重复调用。放在自己提供的快捷方法里面就行。