automaticallyAdjustsScrollViewInsets 和edgesForExtendedLayoutse和translucent
来源:互联网 发布:类似prezi的软件 编辑:程序博客网 时间:2024/05/29 07:58
automaticallyAdjustsScrollViewInsets 默认值即为 YES
@property(nonatomic,assign)BOOL automaticallyAdjustsScrollViewInsetsNS_AVAILABLE_IOS(7_0);// Defaults to YES
View Controller 的 self.view 的第一个 Subview 是 UIScrollView 类型或其子类型(如:UITableView 等)时
你希望你的 UITableView 的内容从 NavigationBar 底部开始展示(因为不这样的话就会被 NavigationBar 遮住一部分,同时还需要在滑动时,UITableView 的布局又能填满全屏。这时你只需要设置 automaticallyAdjustsScrollViewInsets 为 YES 即可
通常情况下如果在一个控制器中有且只有一个 ScrollView 或其子类时,滑动范围会向下移动64px,从而实现穿透导航栏的效果,该属性只会影响到有ScrollView或其子类的页面。
①self.automaticallyAdjustsScrollViewInsets =YES;
①self.automaticallyAdjustsScrollViewInsets =NO;
edgesForExtendedLayout 默认值即为 UIRectEdgeAll
@property(nonatomic,assign)UIRectEdge edgesForExtendedLayoutNS_AVAILABLE_IOS(7_0);// Defaults to UIRectEdgeAll
edgesForExtendedLayout,它是一个类型为UIExtendedEdge的属性,指定边缘要延伸的方向,它的默认值很自然地是UIRectEdgeAll,四周边缘均延伸,就是说,如果即使视图中上有navigationBar,下有tabBar,那么视图仍会延伸覆盖到四周①UIRectEdgeAll
②UIRectEdgeNone
当 automaticallyAdjustsScrollViewInsets 为 YES 时,也是默认行为,表现就比较正常了,和edgesForExtendedLayout = UIRectEdgeNone 有啥区别? 不注意可能很难觉察, automaticallyAdjustsScrollViewInsets 为额YES 时,tableView 上下滑动时,是可以穿过导航栏&状态栏的,在他们下面有淡淡的浅浅红色
iOS7之后self.navigationController.navigationBar.translucent = YES;
原点在(0,0)点
当设置NO的时候,原点坐标在(0,64)点
0 0
- automaticallyAdjustsScrollViewInsets 和edgesForExtendedLayoutse和translucent
- iOS中的translucent和automaticallyAdjustsScrollViewInsets用法
- iOS automaticallyAdjustsScrollViewInsets和translucent的详解
- 进击的KFC: translucent 和 automaticallyAdjustsScrollViewInsets
- iOS中的translucent和automaticallyAdjustsScrollViewInsets用法
- iOS中的translucent和automaticallyAdjustsScrollViewInsets用法
- 关于edgesForExtendedLayout和automaticallyAdjustsScrollViewInsets
- edgesForExtendedLayout 和automaticallyAdjustsScrollViewInsets属性
- edgesForExtendedLayout和automaticallyAdjustsScrollViewInsets
- SetWallpaper, Translucent和TranslucentBlur
- automaticallyAdjustsScrollViewInsets和edgesForExtendedLayout和extendedLayoutIncludesOpaqueBars
- 设置tableView固定位置和尺寸---automaticallyAdjustsScrollViewInsets
- 关于automaticallyAdjustsScrollViewInsets和 edgesForExtendedLayout的理解
- 记录一些易忘的属性(translucent,edgesForExtendedLayout,automaticallyAdjustsScrollViewInsets)
- iOS开发:关于automaticallyAdjustsScrollViewInsets的使用和注意事项
- Android 2.2 API Demos -- setWallpaper, Translucent和TranslucentBlur
- Translucent System Bar (通知栏和App界面融为一体)
- automaticallyAdjustsScrollViewInsets
- (M)(Tree)Lowest Common Ancestor of a Binary Tree
- hdu 5969 最大的位或 ccpc 2016 合肥站
- 学习Hadoop第三十二课(hive练习--多表联合查询)
- 网络层协议
- 编写可靠shell脚本的八个建议
- automaticallyAdjustsScrollViewInsets 和edgesForExtendedLayoutse和translucent
- android graphic(10)—activity申请surface流程
- 解决Android sdk无法下载的问题
- MySQL的基本用法和常用命令
- java中单例模式
- Newton简介--如何纳管vCenter环境
- shiro教程
- AsyncTask异步处理机制
- JDBCUTils