iPhone: Weird space at the top of UINavigationController(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 标题栏之间的视图顶部出现了一个奇怪的空白.替代文字 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 顶部的奇怪空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:iPhone:UINavigationController 顶部的奇怪空间


基础教程推荐
- 如何使用 YouTube API V3? 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01