关于(translucent、automaticallyAdjustsScrollViewInsets、edgesForExtendedLayout)

转自http://www.jianshu.com/p/fa11f6d0e4a2

1.automaticallyAdjustsScrollViewInsets

self.automaticallyAdjustsScrollViewInsets = NO;

automaticallyAdjustsScrollViewInsets只是作用于scrollView上的,不管设不设置,原点都在(0,0)上,设置后只是更改了scrollView的contentOffset.y。
同时,这个属性只对当前设置的控制器起作用。

2.translucent

self.navigationController.navigationBar.translucent = NO;

translucent设置后,原点在(0,64)处,bar不透明。
同时,这个属性对navController下的所有视图控制器都起作用。
(我是不喜欢用)

3.edgesForExtendedLayout

self.edgesForExtendedLayout = UIRectEdgeNone;

edgesForExtendedLayout设置后,原点在(0,64)处,bar半透明。
同时,该属性只对当前设置的控制器起作用。
(其实看作用于哪里,就看他是谁的属性就好啦☺)

你可能感兴趣的:(关于(translucent、automaticallyAdjustsScrollViewInsets、edgesForExtendedLayout))