ios7适配--navgationbar遮住下面view的处理
2013-09-25 14:27
232 查看
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 ? ios cocoa-touch ios6 uinavigationcontroller ios7
| |||
add comment |
1 Answer
activeoldestvotesup vote5down voteaccepted | Well, I figured it out. In your sub-view ( BRSMyListSubViewControllerin 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, NOand YESrespectively but its tableViewis NOT under navbar and footer. I don't know why it's so illogical. It's also strange that edgesForExtendedLayouthas 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 textView处理URL链接 以及点击 长按手势的处理
- ViewPager适配PagerAdapter的时候 instantiateItem方法报错的处理
- iOS7适配问题 UITableView上方出现空白
- tableView 的cell不铺满整个屏幕时,下面多余分割线消失处理
- ios7 tableview scrollsToTop 不执行处理方法
- 处理ios6到ios7后UITableView的两个显示问题
- Android下WebView的图片适配加载与文字自动换行处理
- IOS7学习之路二(处理ios6到ios7后UITableView的两个显示问题)
- iOS7,iOS8,TableViewCell分割线不顶格,在ViewController里面加上下面的俩个方法即可
- 关于iOS7中child viewController 的topLayoutGuide 的length错误的处理
- ios7中,A界面状态栏下面有个UIScrollView,push到B界面后,回退回来UIScrollView下移和可上下拉动的解决
- 转)处理ios6到ios7后UITableView的两个显示问题
- IOS7学习之路二(处理ios6到ios7后UITableView的两个显示问题)
- (转)处理ios6到ios7后UITableView的两个显示问题
- iOS7的适配小问题, uiscrollview中view向下偏移64
- ios7中,A界面状态栏下面有个UIScrollView,push到B界面后,回退回来UIScrollView下移和可上下拉动的解决
- iOS7 导航栏,view适配