Im trying port my app to iOS7, but the height of my TableView increases in ios 7 while it is correct in ios 6. Due to which last row (cell) is almost half under the tab bar.
Im searching a lot for it, but i dont find any solution. Can anyone help me?
Open Storyboard, in Utilities of your UIViewController open "Attributes inspector"
"Under Top Bars" is ticked?
Have a look at iOS 7 UI Transition Guide
if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
Use edgesForExtendedLayout
to specify which edges of a view should be extended, regardless of bar translucency. By default, the value of this property is UIRectEdgeAll
.
if ([self respondsToSelector:@selector(extendedLayoutIncludesOpaqueBars)]) {
self.extendedLayoutIncludesOpaqueBars = NO;
}
If your design uses opaque bars, refine edgesForExtendedLayout
by also setting the extendedLayoutIncludesOpaqueBars
property to NO
.
if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) {
self.automaticallyAdjustsScrollViewInsets = NO;
}
If you don't want a scroll view's content insets to be automatically adjusted, set automaticallyAdjustsScrollViewInsets
to NO
.
You can also set topLayoutGuide
and bottomLayoutGuide
. They indicate the location of the top or bottom bar edges in a view controller's view. If bars should overlap the top or bottom of a view, you can use Interface Builder to position the view relative to the bar by creating constraints to the bottom of topLayoutGuide
or to the top of bottomLayoutGuide
.
Moreover, you can also make adjustments in Interface builder.
And if you are not using autolayout, you can set the deltas for iOS6/7.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.