UIAlertView与UIAlertController
这里有篇文章很好很全http://www.cocoachina.com/ios/20141126/10320.html
在远程推送的时候我们需要跳转到其他界面,当然也会弹出Alert来提醒用户,这是遇到的坑。Xcode Version 8.3.2 (8E2002) iOS10.3 。
在appdelegate里面跳转到别的界面
如果还是用UIAlertView和其代理方法使用
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;
在这个里面写push或者present可能不会进行跳转或遇到崩溃问题。
应该使用最新的UIAlertAction再回调里面写
UIAlertAction *ok = [UIAlertAction actionWithTitle:@"ok"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
}];