在xcode5中添加UITabBarController或者UINavigationController出现下移20px
来源:互联网 发布:网络平台三级分销系统 编辑:程序博客网 时间:2024/05/21 17:26
问题:
我在xcode5中开发程序,系统要求为ios6以上,在ios6系统的设备上运行程序会出现下面的问题:
其中在UIViewController中添加了UITabBarController,UITabBarController每个tab中添加了一个UINavigationController,问题是UITabBarController会下移20个像素。
原因:一般UITabBarController应该添加到window上,如果添加到UIViewController中的View上,它会自动留出20px。
解决方法代码如下:
UITabBarController *tabc=[[UITabBarControlleralloc] init];
[tabc.view setFrame: [self.view bounds]];
红色字体为重点。
这样问题就解决了。嘿嘿~
0 0
- 在xcode5中添加UITabBarController或者UINavigationController出现下移20px
- 在UINavigationController中使用UITabBarController,处理Two-stage Rotation错误
- 在UINavigationController 中增加 UITabBarController 然后设置navigatio
- 给UITabbarController 和 UINavigationController添加过场动画
- UINavigationController,UITabBarController
- UINavigationController, UITabBarController
- UINavigationController+UITabBarController
- UINavigationController、UITabBarController
- 在 UITabBarController 和 UINavigationController tableView被navigati
- 在 UITabBarController 和 UINavigationController tableView被navigati
- xCode5 在ios7模拟器中出现__cxa_throw _pthread_exit错误
- 在UINavigationController的导航栏中添加UISegmentedControl
- 在UINavigationController的导航栏中添加UISegmentedControl
- tabbar在UITabbarController和UINavigationController中的显示,隐藏问题
- 在ScollView中添加自定义的listView或者WebView 出现抢占焦点的问题
- UITabBarController UINavigationController 相结合代码
- UITabBarController UINavigationController 相结合代码
- UINavigationController与UITabBarController
- 黑马程序员—泛型延伸
- 小鬼学cocos2dX笔记01——创建精灵动画(二)
- #pragma mark
- Monkey测试4——Monkey命令行可用的全部选项
- 遇见了一位好老师
- 在xcode5中添加UITabBarController或者UINavigationController出现下移20px
- void的运用
- 在vc的cpp头部加入#define new DEBUG_NEW的作用
- 简要了解API
- 诺基亚为何推安卓手机:微软意在围剿谷歌服务
- s3c6410地址映射
- JAVA实现汉字转全拼或首字母
- javaBean与Map<String,Object>互转
- 学习视频、高清影视下载