iOS overFullScreen与fullScreen区别分析
(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun)
overFullScreen与fullScreen区别
overFullScreen
The views beneath the presented content are not removed from the view hierarchy when the presentation finishes. So if the presented view controller does not fill the screen with opaque content, the underlying content shows through.
当显示结束时,显示内容下面的视图不会从视图层次结构中删除。因此,如果呈现的视图控制器没有用不透明的内容填充屏幕,底层内容就会显示出来。
fullScreen
The views belonging to the presenting view controller are removed after the presentation completes.
属于呈现视图控制器的视图在呈现完成后被移除。
详见Xcode->Window->Developer Documentation
。
总结
如果需要弹出半透明视图使用overFullScreen
,但是由于当显示结束时,显示内容下面的视图不会从视图层次结构中删除
,所以页面消失时下面的视图不会出发viewWillAppear
等方法。
使用fullScreen,在页面消失会触发下面的视图的viewWillAppear
等方法,但是呈现视图控制器的视图在呈现完成后被移除
实现半透明时透明部分直接黑屏展示。
?与熊掌不可兼得???。
以上就是iOS overFullScreen与fullScreen区别分析的详细内容,更多关于iOS overFullScreen fullScreen的资料请关注程序员之家其它相关文章!
相关文章
iOS Runntime 动态添加类方法并调用-class_addMethod
这篇文章主要介绍了iOS Runntime 动态添加类方法并调用-class_addMethod的相关资料,非常不错,具有参考借鉴价值,需要的朋友可以参考下2016-08-08实例讲解iOS应用的设计模式开发中的Visitor访问者模式
这篇文章主要介绍了iOS应用的设计模式开发中的Visitor访问者模式的实例,示例代码为传统的Objective-C,需要的朋友可以参考下2016-03-03
最新评论