使用TabBarController时,导航栏显示在大状态栏下

时间:2015-01-16 01:42:14

标签: ios objective-c iphone uitabbarcontroller uinavigationbar

当我添加一个TabBarController时,TestController的导航栏出现在一个大状态栏下(见截图)。我错过了某个地方的设置吗?感谢。

enter image description here

2 个答案:

答案 0 :(得分:0)

Here it is not clear what do you want to do with navigation bar.If you want to just hide navigation bar,then hide it when you add navigation bar to tab bar controller or you can hide it seperately in each view controller.

 UINavigationController *nav1=[[UINavigationController alloc]initWithRootViewController:vcPictureListing];
    nav1.navigationBarHidden=TRUE;

or for doing it in each viewcontroller you can do it like
 self.navigationController.navigationBar.hidden=TRUE;

This is just for hiding default one.If you want any navigation bar to be present then you can hide this default one and add imageview and button at top of viewcontroller and can have custom one

答案 1 :(得分:0)

如果您为naviagationbar添加了图像,请检查您是否没有为导航栏添加阴影图像。检查导航栏的阴影图像属性。