Automaticallyadjustsscrollviewinsets Properties for IOS Uiviewcontroller

Source: Internet
Author: User

After iOS7.0,Uiviewcontroller added Automaticallyadjustsscrollviewinsets, describing the description of this attribute to the Official document interpretation


automaticallyadjustsscrollviewinsets
Property
A Boolean value that indicates whether the view controller should automatically adjust its scroll view insets.

Declaration
SWIFT
var automaticallyadjustsscrollviewinsets:bool
objective-c
@property (nonatomic, assign) BOOL automaticallyadjustsscrollviewinsets
Discussion
The default value of this property is YES, which allows the view controllers to adjust their scroll view insets in Respon Se to the screens areas consumed by the status bar, navigation bar, and toolbar or tab bar. Set to NO if you want to manage scroll view inset adjustments yourself, such as when there are more than one scroll view in The view hierarchy.

Availability
Available in IOS 7.0 and later.

When we add a uiscrollview in the VC view, set up frame as (0,0,320,568), add sub-view a on Uiscrollview, set the coordinates of a (0,0,100,17), but actually show the results, It looks like the coordinates of A are (0,64,100,17). At this point, you can get the correct coordinate effect as long as you set Automaticallyadjustsscrollviewinsets to No.

The Automaticallyadjustsscrollviewinsets property defaults to ScrollView automatically adapts to the screen

Automaticallyadjustsscrollviewinsets Properties for IOS Uiviewcontroller

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.