问题描述
我在将 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 标题栏之间的视图顶部出现了一个奇怪的空白.替代文字 http://www.andrewskinner.name/problem.png
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. alt text http://www.andrewskinner.name/problem.png
我在网上搜索过,但不知道要搜索什么.有没有其他人有这个问题?你能给我指明一些帮助的方向吗?
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 被轻推增加约 10 像素
这篇关于iPhone:UINavigationController 顶部的奇怪空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)