[IOS Diary] about Uiviewcontroller the location of his own view and the relationship between Navigationbar and StatusBar

Source: Internet
Author: User
Tags deprecated

Uiviewcontroller.view is initialized and assigned by Uiviewcontroller, and some special changes have been made to this view.


Wantfullscreenlayout = False by default in iOS6; So, he would put this view.origin.y = Statusbar.height + navigationbar.height;

Wantsfullscreenlayout properties have been discarded

Automaticallyadjustsscrollviewinsets properties are enabled in IOS7

By setting Automaticallyadjustsscrollviewinsets = True in iOS7, he will move all ScrollView contentoffset down by 64 pixels, namely Statusbar.height + Navigationbar.height.

So, by setting these two properties, you can determine the location of its viewcontroller.view and its child view.


The question, in other words, what does it mean to be wantsfullscreenlayout this attribute in iOS7?

Wantsfullscreenlayout


A Boolean value indicating whether the view should underlap the status bar. (Deprecated in IOS 7.0.)

@property (nonatomic, assign) BOOL Wantsfullscreenlayout

Discussion

When a view controller presents its view, it normally shrinks this view so it frame does not overlap the device ' s St ATUs Bar. Setting This property to YES causes the view controller to size its view and it fills the entire screen, including the Area under the status bar. (Of course, for this to happen, the window hosting the view controller must itself is sized to fill the entire screen, Inc. Luding the area underneath the status bar.) You would typically the set this property to the cases where you have a translucent status bar and want view ' s content To is visible behind that view.

If It is YES, the view isn't resized in a way so would cause it to underlap a tab bar but be resized to unde Rlap Translucent Toolbars. Regardless of the value of this property, navigation controllers always allow views to underlap translucent navigation bar S.

The default value is NO, which causes the "view to being laid out" it does not underlap the status bar.

Availability Available in IOS 3.0 and later. Deprecated in IOS 7.0.

Related Sample Code Uiimagepicker Video Recorder

declared in

UIViewController.h



Related Article

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.