ios7适配--navgationbar遮住下面view的处理
来源:互联网 发布:淘宝店铺营业时间设置 编辑:程序博客网 时间:2024/06/04 19:43
3down votefavorite
Have you guys stumbled up on this issue ?
Basically in iOS 7 Navigation Controller is rendered over the sub-view I navigated to.
In iOS 6 view I navigate to is enclosed between navigation bar and footer. In iOS 7 it looks like sub-view is rendered full-screen, under navigation bar and footer. As result user don't see it.
Here is how I navigate to subview
BRSMyListSubViewController*tagsInfoVC =[[BRSMyListSubViewController alloc] initWithCheckinsList:self.checkinsList selectedTag:[self tagByIndexPath:indexPath]];[self.navigationController pushViewController:tagsInfoVC animated:YES];
Here is how I initialize it in viewDidLoad
self.navigationItem.leftBarButtonItem =[[UIBarButtonItem alloc] initWithTitle:@"Settings" style:UIBarButtonItemStyleBordered target:self action:@selector(settings:)];self.navigationItem.rightBarButtonItem =[[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStyleBordered target:self action:@selector(logout:)];
For what it's worth I should also mention that sub-view is defined in XIB using Autolayout. Here is source of my XIB: http://pastebin.com/6RR0zYu4
And finally here is how it looks in iOS 6
And in iOS 7
Any thoughts ?
1 Answer
Well, I figured it out.
In your sub-view (BRSMyListSubViewController
in my case), in viewDidLoad
, you need to set one of these two
self.edgesForExtendedLayout =UIRectEdgeNone;self.automaticallyAdjustsScrollViewInsets = NO;
OR
self.edgesForExtendedLayout =UIRectEdgeNone;self.extendedLayoutIncludesOpaqueBars = YES;
Interestingly enough in root view controller these value are set to default UIRectEdgeAll
, NO
andYES
respectively but its tableView
is NOT under navbar and footer.
I don't know why it's so illogical.
It's also strange that edgesForExtendedLayout
has to be mixed with one of two other properties even though it's clearly responsible for the behavior.
- ios7适配--navgationbar遮住下面view的处理(转)
- ios7适配--navgationbar遮住下面view的处理
- IOS7 navgationbar遮挡下面的View的问题
- ios7 navgationbar遮挡住view
- 打开键盘遮住View的问题解决方法
- ios7 uinavigationbar下面的黑线
- 打开键盘遮住View的问题解决方法-IOS开发
- 打开键盘遮住View的问题解决方法-IOS开发
- 打开键盘遮住View的问题解决方法-IOS开发
- 打开键盘遮住View的问题解决方法-IOS开发
- iOS7 导航栏,view适配
- ios7适配 通知栏UINavigationBar遮挡view的问题
- UITextField和UITextView被键盘遮住的处理办法
- iOS7 Xcode5 键盘的处理
- iOS7的多任务处理
- iOS7的多任务处理
- iOS7以后解决view上移的问题
- cocos2d-x在IOS7下面文字显示异常的解决办法
- programming study 2014.08.07
- Linux多线程资源汇总
- Android有效解决加载大图片时内存溢出的问题 Out of memory
- 访问当前沙盒下的文件
- hdu 4923 Room and Moor 堆栈
- ios7适配--navgationbar遮住下面view的处理
- 撒大大是梵蒂冈的地方
- 撒大大是梵蒂冈的地方
- hdu 1879 继续畅通工程
- Activity使用Dialog样式导致点击空白处自动关闭的问题
- chrome浏览器本地文件支持ajax请求的解决方法
- 撒大大是梵蒂冈的地方
- Mysql 中使用DATE_FORMAT函数按月、周统计数据
- 在UIWebView中添加自定义编辑菜单