[IOS] edgesForExtendedLayout, automaticallyAdjustsScrollViewInsets, and scrolllayout
After IOS7, ViewController starts to use full screen layout, and the default behavior usually involves layout.
EdgesForExtendedLayout is an attribute of the uiextendedge type,
Specify the direction of the edge to be extended. The default value is UIRectEdgeAll, and the surrounding edge is extended, that is,
If the view contains navigationBar and tabBar, the view will extend to the surrounding area.
This attribute is set to UIRectEdgeNone to prevent tableView from extending to the navigationBar.
UIRectEdgeAll -- default
UIRectEdgeNone
The navigation bar will be grayed out, and the processing will be OK as follows
Self. navigationController. navigationBar. translucent = NO;
What about automaticallyAdjustsScrollViewInsets?
When automaticallyAdjustsScrollViewInsets is NO, tableview starts from the top of the screen, that is
Navigation Bar & Status Bar coverage
When automaticallyAdjustsScrollViewInsets is set to YES, it is also the default behavior, and the performance is normal.
What is the difference between edgesForExtendedLayout = UIRectEdgeNone? Inattention may be hard to perceive
Designers can see right at a glance... When automaticallyAdjustsScrollViewInsets is YES,
When the table view slides up and down, it can pass through the navigation bar and the status bar, and there is a light red below them
ExtendedLayoutIncludesOpaqueBars
First, let's take a look at the official explanation. The default value is NO, but the default attribute of Bar is transparent... That is to say, it is useful only when it is not transparent.
However, the test results are very weak, and the basic difference is not big... But it still works to solve some bugs, such as the SearchBar
Runout problem, see: http://www.cnblogs.com/skyming/p/4059128.html, other UITableView, UIScrollView location
Most of the problems are related to these three attributes ..