你好,下面方式, alert不能弹出,还会造成界面卡死
SPAlertController *alertController = [SPAlertController alertControllerWithTitle:@"请选择变更的场景,变更后报警规则将重置" message:@"subtile" preferredStyle:SPAlertControllerStyleActionSheet animationType:SPAlertAnimationTypeFromBottom];
SPAlertAction *new = [SPAlertAction actionWithTitle:@"+ 新建场景" style:SPAlertActionStyleDestructive handler:^(SPAlertAction * _Nonnull action) {
NSLog(@"点击了 新建场景");
}];
SPAlertAction *cancel = [SPAlertAction actionWithTitle:@"取消" style:SPAlertActionStyleCancel handler:^(SPAlertAction * _Nonnull action) {
NSLog(@"点击了Cancel");
}];
[alertController addAction:new];
[alertController addAction:cancel];
[alertController setBackgroundViewAppearanceStyle:appearanceStyle alpha:0.5];
你好,请问是在什么情况下弹出来的,我复制你的代码在我的demo里弹出来是没问题的
乐升平 许思必客行 中华人民共和国
手机:13879857085 邮箱:[email protected]
电话:000-00000000 地址:上海市浦东新区居里路99号
在2019年08月30日 10:03,CoderJJMa[email protected] 写道: SPAlertController *alertController = [SPAlertController alertControllerWithTitle:@"请选择变更的场景,变更后报警规则将重置" message:@"subtile" preferredStyle:SPAlertControllerStyleActionSheet animationType:SPAlertAnimationTypeFromBottom];
SPAlertAction *new = [SPAlertAction actionWithTitle:@"+ 新建场景" style:SPAlertActionStyleDestructive handler:^(SPAlertAction * _Nonnull action) {
NSLog(@"点击了 新建场景");
}];
SPAlertAction *cancel = [SPAlertAction actionWithTitle:@"取消" style:SPAlertActionStyleCancel handler:^(SPAlertAction * _Nonnull action) {
NSLog(@"点击了Cancel");
}];
[alertController addAction:new];
[alertController addAction:cancel];
[alertController setBackgroundViewAppearanceStyle:appearanceStyle alpha:0.5];
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
我也遇到了类似的问题。 在handler里 跳转页面,页面跳转过去了,但是UI有部分没刷新