iOS - Modal后控制器的关系 及 modal后不移除后面的控件

来源:互联网 发布:p2p网贷数据库 编辑:程序博客网 时间:2024/06/08 11:07

控制器modal之间的关系

// a modal 出 b[a presentViewController:b animated:YES completion:nil];a.presentedViewController -> b;b.presentingViewController -> a;


一般情况下,modal出来的控制器会占据整个屏幕,而后面的控件都会被系统自动给移除掉,但有的时候我们并不想让它们被移除掉,那我们可以设置modal的style为Custom来解决这个问题

b.modalPresentationStyle = modalPresentationStyleCustom

0 0
原创粉丝点击