[英]UITabbarController layout issues in iOS 7 - view going behind the navigation bar
I'm working on mobile solution which needs to be upgraded to iOS 7. I've a tabbar controller with 4 tabs which is embedded in a Navigation Controller. 我正在开发需要升级到iOS 7的移动解决方案。我有一个带有4个选项卡的tabbar控制器,它嵌入在导航控制器中。 All 4 view controllers of tab bar are having a tableview laid at (0,0) origin and set to size of view with resizing handles set properly. 标签栏的所有4个视图控制器都有一个放置在(0,0)原点的tableview,并设置为视图大小,并且正确设置了调整大小的句柄。 When I launch the application, the table view in the first tab bar item is displaying properly below the navigation item where as the table views in the remaining 3 tabbar items are going below the navigation item. 当我启动应用程序时,第一个标签栏项目中的表格视图正确显示在导航项目下方,其中3个标签栏项目中的表格视图位于导航项目下方。 The base controller is same for all view controllers in which I've set the following code. 基本控制器对于我设置了以下代码的所有视图控制器都是相同的。
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
[self performSelector:@selector(setEdgesForExtendedLayout:) withObject:[NSNumber numberWithInt:UIRectEdgeNone]];
}
I've also deselected "Under Top Bars" & "Under Bottom Bars" under "Extend Edges" section in storyboard for the concerned view controllers. 我还在故事板中的“Extend Edges”部分下取消选择“顶部条形图”和“底部条形图”下的相关视图控制器。 But still the issue remains same. 但问题仍然存在。
Any inputs on this would help me a lot. 对此的任何投入都会对我有所帮助。
Thanks 谢谢
Sudheer Sudheer
通过将setEdgesForExtentedLayout设置为UIRabEdgeNone到UITabbarController而不是将其设置为选项卡栏中的每个和各个视图控制器,已解决此问题。
尝试这个:
self.tabBarController.tabBar.translucent = NO;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.