Red is ScrollView background color, after adding a picture on the ScrollView, there will always be a downward offset
Setting Contentoffset doesn't work either.
In iOS7, the controller has a
Automaticallyadjustsscrollviewinsets property, default = Yes
if (ios7&&[self respondstoselector: @selector (automaticallyadjustsscrollviewinsets)]) { Self.automaticallyadjustsscrollviewinsets = NO; }
|
@property (nonatomic, assign) BOOL automaticallyadjustsscrollviewinsets |
|
Description |
Specifies whether or not, the view controller should automatically adjust its scroll view insets. |
|
|
Default value is YES, which allows the view controllers to adjust their scroll view insets in response to the screen Areas consumed by the status bar, navigation bar, and toolbar or tab bar. Set toNO 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 |
IOS (7.0 and later) |