IOS Full Screen layout

Source: Internet
Author: User

The Edgesforextendedlayout property is used instead of wantsfullscreenlayout to control the extent of the page display, and the default value is Uirectedgeall

Automaticallyadjustsscrollviewinsets: Usually we want the ScrollView or uitableview content to appear below the Uinavigation bar. After iOS7, the default value is yes, so it is full screen, but note that scrollview to be the root view of the controller (PS: It does not appear to be a root view when using the Xib layout), The difference between automaticallyadjustsscrollviewinsets = yes and edgesforextendedlayout = Uirectedgenone is that the former Uinavigation bar is displayed transparently, The latter is opaque, so when you use Uisearchdisplaycontroller, the TableView is set to root view and there is no animation problem;

Extendedlayoutincludesopaquebars: He was used with the translucent attribute of attribute Navigationbar, Controls whether the scope of the root view layout is from Navigationbar or full-screen layout (Ps:extendedlayoutincludesopaquebars and Edgesforextendedlayout properties are not combined to produce effects, Although Edgesforextendedlayout can also make navigationbar opaque), if you want to implement Uisearchdisplaycontroller search box animations in navigation bar opacity, To be able to set this

Self.navigationController.navigationBar.translucent = NO;
[Self setextendedlayoutincludesopaquebars:yes]; Extend below the opaque bar

Self.navigationController.navigationBar.translucent = NO;  Self.extendedlayoutincludesopaquebars = NO; The visual effect of this setting is the same as Edgesforextendedlayout = Uirectedgenone, and the layout of the root view is consistent, if it and self.edgesforextendedlayout = Uirectedgeall; At the same time, regardless of the order of the set, is the former function;

IOS Full Screen layout

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.