SPStore/SPAlertController

不设置title和message AlertAction 回调无效

Opened this issue · 0 comments

xhjss commented

SPAlertController *alertController = [SPAlertController alertControllerWithTitle:nil
message:nil
preferredStyle:SPAlertControllerStyleActionSheet];
SPAlertAction *contact = [SPAlertAction actionWithTitle:ASLocalized(@"解除绑定")
style:SPAlertActionStyleDefault
handler:^(SPAlertAction * _Nonnull action) {

                                 NSLog(@"无效");           
}];
SPAlertAction *cacel = [SPAlertAction actionWithTitle:ASLocalized(@"取消") style:SPAlertActionStyleDefault handler:nil];
[alertController addAction:contact];
[alertController addAction:cacel];
// 设置对话框不需要毛玻璃
alertController.needDialogBlur = NO;
[self presentViewController:alertController animated:YES completion:nil];