// 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