IOS7 edgesForExtendedLayout
来源:互联网 发布:ip变换软件 编辑:程序博客网 时间:2024/05/01 06:48
在iOS 7中,苹果引入了一个新的属性,叫做[UIViewController setEdgesForExtendedLayout:],它的默认值为UIRectEdgeAll。当你的容器是navigation controller时,默认的布局将从navigation bar的顶部开始。这就是为什么所有的UI元素都往上漂移了44pt。有时会加上顶部tool bar的高度 20, 20+44 = 64
解决办法
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
if (OSVersionIsAtLeastiOS7()) {
if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
{
self.edgesForExtendedLayout = UIRectEdgeNone;
}
}
}
0 0
- iOS7 edgesForExtendedLayout
- IOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- IOS7 edgesForExtendedLayout
- IOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- iOS7 edgesForExtendedLayout
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- iOS7 新特性 edgesForExtendedLayout
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- edgesForExtendedLayout ios7新特性
- iOS7新特性 edgesForExtendedLayout
- NineOldAnimations 源码解析
- php simple_html_dom网页采集
- 1036. Boys vs Girls (25)
- wifi万能钥匙原理猜想
- 【Qt OpenGL教程】12:显示列表
- IOS7 edgesForExtendedLayout
- Fragment的生命周期
- mybatis 增删改查操作
- c语言01
- Android 继承SQLiteOpenHelper自定义DBHelper存取数据与图像
- JavaWeb用户登陆--项目环境的搭建
- GUI编程,单选按钮、复选框、消息框、消息响应函数的使用
- leetcode——Count Complete Tree Nodes
- Xcode的快捷键及代码格式化