Present新视图时旧视图不消失的办法,类似推出UIAlertController

有时候需要些弹出视图,但又不想使用View来添加,这时候可以新建一个controller进行布局,类似退出系统的UIAlertController,具体做法如下:

        RewardViewController *rewawrd = [[RewardViewController alloc] init];
        rewawrd.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
        rewawrd.modalPresentationStyle = UIModalPresentationCustom;
        [self presentViewController:rewawrd animated:YES completion:nil];

 

posted @ 2017-03-14 11:00  YouNeedCourage  阅读(368)  评论(0编辑  收藏  举报