ios7适配--navgationbar遮住下面view的处理
3 down vote favorite 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 inviewDidLoad 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 share | edit | flag editedAug 29 at 18:47 asked Aug 29 at 4:09 ruslan 3,422 1 15 55 add comment 1 Answer active oldest votes up vote 5 down vote accepted Well, I figured it out. In your sub-view (BRSMyListSubViewControllerin my case), inviewDidLoad, 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 defaultUIRectEdgeAll,NOandYESrespectively but itstableViewis NOT under navbar and footer. I don't know why it's so illogical. It's also strange thatedgesForExtendedLayouthas to be mixed with one of two other properties even though it's clearly responsible for the behavior. share | edit | flag editedAug 29 at 6:11 answered Aug 29 at 5:29 ruslan 3,422 1 15 55 upvote flag Thank you for putting the answer, it really helped me.–titicacaSep 12 at 6:11 欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处! 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/p/3338688.html ,如需转载请自行联系原作者