IOS7 Navigation Bar Fit Two

Source: Internet
Author: User

iOS7 apps are full-screen, meaning that all the controller's view defaults from the screen (0,0) start.

When used in the navigation bar, the navigation bar will often appear blocked situation.

The most obvious is that when TableView is used, the first row of data is obscured by the navigation bar.

Two workarounds:

First, Set the translucent (semitransparent) property of the navigation controller's navigation bar under the controller to No, the Translucent property defaults to No before IOS6, The navigation bar under IOS7 is semi-transparent by default, and yes, so this property does not occupy space. The premise is that you don't need the nav bar translucent effect.

Second, set the navigation controller under the controller translucent (translucent) property of the navigation bar is the No,translucent property default to No before IOS6, and the navigation bar under IOS7 is semi-transparent by default, yes, Therefore, this property does not occupy space. The premise is that you don't need the nav bar translucent effect.

 @property (nonatomic,assign) Uirectedge edgesforextendedlayout Ns_available_ios (7_0); //  Defaults to Uirectedgeall  @property (nonatomic,assign) BOOL Extendedlayoutincludesopaquebars Ns_available_ios (7_0); //   Defaults to NO, but bars is translucent by default on 7_0.  @property (nonatomic,assign) BOOL automaticallyadjustsscrollviewinsets Ns_available_ios (7_0); //  Defaults to YES  
Attribute edgesforextendedlayout, which means that the edge is about to unfold around

The edgesforextendedlayout value is the struct body. The default value is Uirectedgeall, which fills the entire screen up or down.

1. Uirectedgenone do not spread around the edge (according to the non-iOS7 tradition to show)

After setting this sentence, the Y value of the controller frame pressed into the buyers is the beginning of the navigation bar.

IOS7 Navigation Bar Fit Two

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.