Skip to content

不设置title和message AlertAction 回调无效 #18

Open
@xhjss

Description

@xhjss

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];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions