你好,下面方式, alert不能弹出,还会造成界面卡死
Opened this issue · 2 comments
ziyouzhe4 commented
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];
SPStore commented
你好,请问是在什么情况下弹出来的,我复制你的代码在我的demo里弹出来是没问题的
乐升平 许思必客行
中华人民共和国
手机:13879857085 邮箱:lesp163@163.com
电话:000-00000000 地址:上海市浦东新区居里路99号
在2019年08月30日 10:03,CoderJJMa<notifications@github.com> 写道:
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.
ZRD1112 commented
我也遇到了类似的问题。 在handler里 跳转页面,页面跳转过去了,但是UI有部分没刷新