转自:
http://www.cnblogs.com/macroxu-1982/p/3333403.html
在ios 7 系统中 NavigateBar 显示在主View中 ,Ios6 不在主View中,导致后台代码的方式编写View不一致
解决方法:
在ViewControl的viewDidLoad 方法中
- (void)viewDidLoad{
float systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
if (systemVersion >= 7.0)
{
//某个仅支持7.0以上版本的方法
self.edgesForExtendedLayout = UIRectEdgeNone;
}
}
我为这个问题找了好久的答案!眼睛都痛了,还好解决了!
在ios 7 系统中 NavigateBar 显示在主View中 ,Ios6 不在主View中,导致后台代码的方式编写View不一致
解决方法:
在ViewControl的viewDidLoad 方法中
- (void)viewDidLoad{
float systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
if (systemVersion >= 7.0)
{
//某个仅支持7.0以上版本的方法
self.edgesForExtendedLayout = UIRectEdgeNone;
}
}
我为这个问题找了好久的答案!眼睛都痛了,还好解决了!

本文介绍了如何解决iOS7系统中导航栏显示在主视图中的问题,通过判断系统版本并设置`edgesForExtendedLayout`属性来实现适配。

被折叠的 条评论
为什么被折叠?



