简体   繁体   English

iOS 7中的UITabbarController布局问题 - 视图位于导航栏后面

[英]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.

相关问题 带导航栏和视图控制器的自动布局(iOS 7) - Auto Layout with navigation bar and view controller (iOS 7) UITabBarController中“更多”视图控制器的自定义导航栏 - Custom navigation bar for the “More” View Controller in a UITabBarController 在iOS 10中的iMessage扩展中,导航栏后面可以看到集合视图 - Collection view visible behind navigation bar in iMessage Extension in iOS 10 集合视图在iOS的iMessage Extension中的导航栏后面可见 - Collection view visible behind navigation bar in iMessage Extension in iOS 导航回父级View Controller时,UIButton在标签栏后面-iOS - UIButton going behind Tab Bar when navigating back to parent View Controller - iOS 为UITabBarController子视图控制器设置相同的导航栏? - Set same navigation bar for UITabBarController child view controllers? 将我的视图连接到UITabBarController时导航栏下的内容 - Content under the navigation bar when connect my view to a UITabBarController UITabBarController的子视图控制器中的导航栏按钮无响应 - Navigation bar button unresponsive in child view controller of UITabBarController 表格视图的导航栏下降 - Navigation Bar of Table View is going down 如何为视图设置动画以隐藏在导航栏后面 - How to animate a view to hide behind Navigation Bar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM