我附上了 UI 在不同 iOS 版本上的外观。
下面是我的代码:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:contactsViewController];
[self.viewController presentModalViewController:navController animated:YES];
iOS 6
iOS 7
第一个问题是 iOS 6 中的状态栏我没有状态栏。第二个问题是 overdraw 两个 View 。如何解决?
最佳答案
您可能希望使用可调整大小的图像:
[image resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0) resizingMode:UIImageResizingModeStretch];
或者,按照AliSoftware的建议,将扩展布局边缘设置为UIRectEdgeNone
(务必检查是否支持edgesForExtendedLayout
(您的应用将如果分配此属性在 iOS 6.x 设备上运行时会崩溃:
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
关于uinvigationcontroller 问题的 iOS 7 导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18813805/