iPhone:UINavigationController顶部的奇怪空间 [英] iPhone: Weird space at the top of UINavigationController

查看:141
本文介绍了iPhone:UINavigationController顶部的奇怪空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,添加一个UINavigationController到我的iPhone应用程序。我添加控制器如下:

I'm having a strange problem with adding a UINavigationController to my iPhone application. I add the controller as follows:

myViewController *viewController = [[myViewController alloc] initWithNibName:@"myView" bundle:nil];

myNavigationViewController *navigationController = [[myNavigationViewController alloc] initWithRootViewController:viewController];

UIView *finalView = myeNavigationViewController.view;

[self.view addSubview:finalView];

似乎按计划工作,但我得到一个奇怪的空白,状态栏和UINavigationController标题栏。

All seems to work as planned except I get a weird white space at the top of my view between the status bar and the UINavigationController title bar.

我已在线搜寻但真的不知道要搜索什么。有其他人有这个问题吗?

I've searched online but don't really know what to search for. Has anyone else had this problem? Can you point me in the direction of some help?

提前感谢。

推荐答案

查看此问题的答案:

不确定为什么UIView被微调大约10px

这篇关于iPhone:UINavigationController顶部的奇怪空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆