Some changes after the iOS7

Source: Internet
Author: User

// define macros, Judge iOS7 #define IOS7 [[[Uidevice currentdevice]systemversion] floatvalue] >= 7.0
if (iOS7) {        = NO;         = uirectedgenone;    }

1, self.automaticallyadjustsscrollviewinsets = NO;
Look at this attribute of this uiviewcontroller you understand that this property defaults to Yes, so that if there is only one uiscollview or its subclasses under Uiviewcontroller, then the blank will be left automatically. Let the Scollview scroll through the various bar below can vaguely see content. But each uiviewcontroller can only have a single uiscollview or its subclasses, if more than one, you need to set this property to No, to control the left white and coordinate problems.

2, in iOS 7, Apple introduced a new property, called [uiviewcontroller setedgesforextendedlayout:] , its default value is uirectedgeall . When your container is a navigation controller, the default layout starts at the top of the navigation bar. That's why all UI elements are drifting up to 44pt.

[uiviewcontroller Setedgesforextendedlayout:], its default value is uirectedgeall . When your container is a navigation controller, the default layout starts at the top of the navigation bar. That's why all UI elements are drifting up to 44pt.

-(void) viewdidload add the following line of code:

1
 self. edgesforextendedlayout = uirectedgenone;

So the problem is fixed.

Cond...

Some changes after the iOS7

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.