For details about attributes of iOS edgesForExtendedLayout, extendedLayoutIncludesOpaqueBars, and automaticallyAdjustsScrollViewInsets, opaque

Source: Internet
Author: User

For details about attributes of iOS edgesForExtendedLayout, extendedLayoutIncludesOpaqueBars, and automaticallyAdjustsScrollViewInsets, opaque

EdgesForExtendedLayout:

 

After IOS7, ViewController began to use full-screen layout. The default behavior usually involves layout, which is inseparable from edgesForExtendedLayout. It is an attribute of the UIExtendedEdge type, the default value of the edge to be extended is UIRectEdgeAll, and the surrounding edges are extended. That is to say, if there is a navigationBar in the view and a tabBar in it, 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

In this case, the navigation bar becomes grayed out, and the process is OK as follows. self. navigationController. navigationBar. translucent = NO;

AutomaticallyAdjustsScrollViewInsets:

When automaticallyAdjustsScrollViewInsets is NO, tableview starts from the top of the screen, that is, it is overwritten by the navigation bar and status bar.


When the value of automaticallyAdjustsScrollViewInsets is YES, it is also the default behavior and the performance is normal. What is the difference between it and edgesForExtendedLayout = UIRectEdgeNone? It may be hard to notice. When the value of automaticallyAdjustsScrollViewInsets is YES, you can go through the navigation bar and the status bar when the table view slides up and down, with a light red color 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 ..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.