ios7适配--navgationbar遮住下面view的处理
2014-08-07 18:10
218 查看
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学习之路二(处理ios6到ios7后UITableView的两个显示问题)
- ios7 navgationbar遮挡住view
- ios7 tableview scrollsToTop 不执行处理方法
- iOS7的适配小问题, uiscrollview中view向下偏移64
- ViewPager适配PagerAdapter的时候 instantiateItem方法报错的处理
- 悬浮球(多机型悬浮窗权限设置,状态栏适配,可自动或手动设置大小,点击跳转WebView,拖拽处理)
- iOS7的适配小问题, uiscrollview中view向下偏移64
- Android下WebView的图片适配加载与文字自动换行处理
- iOS7适配问题 UITableView上方出现空白
- iOS7上tableView的分割线左边短了一点 处理办法
- iOS7,iOS8,TableViewCell分割线不顶格,在ViewController里面加上下面的俩个方法即可
- iOS7 UIScrollView 适配问题
- IOS7学习之路二(处理ios6到ios7后UITableView的两个显示问题)
- 处理ios6到ios7后UITableView的两个显示问题
- (转)处理ios6到ios7后UITableView的两个显示问题
- iOS7 导航栏,view适配
- tableView 的cell不铺满整个屏幕时,下面多余分割线消失处理