Screen fit 1 (edgesforextendedlayout, extendedlayoutincludesopaquebars, translucent, automaticallyadjustsscrollviewinsets )

Source: Internet
Author: User

Starting with IOS7, Apple began advocating full-screen layout, that is, by default the size of the controller's root view equals the size of the screen, even if the size of the Navigationbar+tabbar,view is not equal to the size of the screen, The result is that Navigationbar and Tabbar will cover the top and bottom areas of the view. As a result

The top area of the current root view is covered by the navigation bar.

To avoid being overwritten, you need to modify the Edgesforextendedlayout property.

Edgesforextendedlayout is an enumeration type. typedefenum: Nsuinteger {uirectedgenone=0, Uirectedgetop=1<<0, Uirectedgeleft=1<<1, Uirectedgebottom=1<<2, Uirectedgeright=1<<3, Uirectedgeall= Uirectedgetop | Uirectedgeleft | Uirectedgebottom |Uirectedgeright} Uirectedge;self.view.edgesforextendedlayout= Uirectedgetop;//indicates that the view extends up to the screen border. Self.view.edgesForExtendedLayout = Uirectedgeall;//represents the various borders that the view extends around to the screen. Self.view.edgesForExtendedLayout = Uirectedgenone;//indicates that the view does not extend around and is guaranteed not to be overwritten by Navigationbar and Tabbar. 

Screen fit 1 (edgesforextendedlayout, extendedlayoutincludesopaquebars, translucent, automaticallyadjustsscrollviewinsets )

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.