Translucent and automaticallyadjustsscrollviewinsets usage in iOS

Source: Internet
Author: User

Translucent and automaticallyadjustsscrollviewinsets usage in iOS about these two properties I'll cut it short.

Specific can be more specific circumstances to set:

    • Translucent usage
    • Automaticallyadjustsscrollviewinsets usage
Translucent usage

IOS7 since navigationbar.translucent default is yes,
Origin point at (0,0) point
When no is set, the origin coordinates are at (0,64) point

// 原点从(0,64)开始self.navigationController.navigationBar.translucent = NO;
Automaticallyadjustsscrollviewinsets usage

There are two things you can do when you use them.

1: Set Self.automaticallyadjustsscrollviewinsets separately

// 原点从(0,64)开始self.automaticallyAdjustsScrollViewInsets = NO;

2: Individual self.automaticallyadjustsscrollviewinsets = no setting, origin is (0,0) start

// 原点从(0,0)开始self.automaticallyAdjustsScrollViewInsets = NO;

3: Set with Self.edgesforextendedlayout, the origin is (0,64) start

// 原点从(0,64)开始self.automaticallyAdjustsScrollViewInsets = NO;self.edgesForExtendedLayout = UIRectEdgeNone;

The system will automatically start with the view down 64,frame (0,64) according to Uinavigationbar and StatusBar. In this way, we can still start from (0,0) when we are laying out the internal controls, without worrying that the upper part is uinavigationbar obscured.

Translucent and automaticallyadjustsscrollviewinsets usage in iOS

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.