iOS7 新特性 edgesForExtendedLayout
来源:互联网 发布:unity3d缓存清理 编辑:程序博客网 时间:2024/04/29 08:35
edgesForExtendedLayout是一个类型为UIExtendedEdge的属性,指定边缘要延伸的方向。
因为iOS7鼓励全屏布局,它的默认值很自然地是UIRectEdgeAll,四周边缘均延伸,就是说,如果即使视图中上有navigationBar,下有tabBar,那么视图仍会延伸覆盖到四周的区域。
self.edgesForExtendedLayout = UIRectEdgeNone;
来解决UINavigationBar透明的问题。设置了UIRectEdgeNone之后,你嵌在UIViewController里面的UITableView和UIScrollView就不会穿过UINavigationBar了,同时UIView的控件也回复到了iOS6时代。
不过这个对于Status Bar在iOS7上面的变化是无效的,正确的说应该是部分无效。在存在Navigation部分或者Tabbar部分的时候,上面的代码可以使得Status Bar也不载透明(有待验证,毕竟UIViewController的可用空间被控制了),但是在没有这两个部分的时候,Status Bar依旧是会记入UIView范围的。
0 0
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- iOS7 新特性 edgesForExtendedLayout
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- iOS7新特性 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- IOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- IOS7 edgesForExtendedLayout
- IOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- 【二】 Chrome的进程间通信
- 微信支付V3版开发中遇到的一个问题及原因:缺少prepay_id
- 学而不玩则呆
- 万能的Java WebService调用程序支持C# JAVA WS调用
- 009redis的事务(transaction)
- iOS7 新特性 edgesForExtendedLayout
- 目标跟踪之粒子滤波
- windows storm安装及本地模式执行
- 博弈入门
- 010redis中数据的排序(sort)
- 问题记录.
- codepath教程:浮动操作按钮详解
- 获取设备信息以及APP版本
- jquery datepicker 设置只显示周一和周末