IOS7升级攻略
2013-09-27 16:58
197 查看
1) Select the main view, set the background color to black (or whatever color you want the status bar to be
2) Make sure the background is a self contained subview positioned as a top level child of the controller's view.
Move your background to become a direct child of the controller's view.
Check the autosizing panel to be sure that you've locked all frame
edges, activated both flexibility axes, and if this is a UIImageView,
set the content mode to Scale to fill. Programmatically this
translates to contentMode set to UIViewContentModeScaleToFill and has
its auto resizing mask set to (UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight).
3) Now move everything that is locked to the top - down by 20 pts and set a iOS 6/7 delta Y to -20.
All top level children that are locked to the top frame in the
autosizing panel need to be moved down by 20pts and have their iOS 6/7
delta Y set to -20. (Cmd select all of those, and click down arrow 20
times - is there a better way anyone?)
4) Adjust the iOS 6/7 delta height of all of the above items that had a flexible height.
Any of the items that were locked to the frame top and bottom and had
flexible height enabled in the autosizing panel must also have their iOS
6/7 delta height set to 20. That includes the background view
mentioned above. This may seem anti-intuitive, but due to the order in
which these are applied, it is necessary. The frame height is set first
(based on device), then the deltas are applied, and finally the
autosizing masks are applied based upon the offset positions of all of
the child frames - think it through for a bit, it will make sense.
5) Finally, items that were locked to the bottom frame but not the top frame need no deltas at all.
That will give you the identical status bar in iOS7 and iOS6.
On the other hand, if you want iOS7 styling while maintaining iOS6 compatibility, then set the delta Y / delta height values to 0 for the background view.
To see more iOS7 migration info read the full post: http://uncompiled.blogspot.com/2013/09/legacy-compatible-offsets-in-ios7.html
2) Make sure the background is a self contained subview positioned as a top level child of the controller's view.
Move your background to become a direct child of the controller's view.
Check the autosizing panel to be sure that you've locked all frame
edges, activated both flexibility axes, and if this is a UIImageView,
set the content mode to Scale to fill. Programmatically this
translates to contentMode set to UIViewContentModeScaleToFill and has
its auto resizing mask set to (UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight).
3) Now move everything that is locked to the top - down by 20 pts and set a iOS 6/7 delta Y to -20.
All top level children that are locked to the top frame in the
autosizing panel need to be moved down by 20pts and have their iOS 6/7
delta Y set to -20. (Cmd select all of those, and click down arrow 20
times - is there a better way anyone?)
4) Adjust the iOS 6/7 delta height of all of the above items that had a flexible height.
Any of the items that were locked to the frame top and bottom and had
flexible height enabled in the autosizing panel must also have their iOS
6/7 delta height set to 20. That includes the background view
mentioned above. This may seem anti-intuitive, but due to the order in
which these are applied, it is necessary. The frame height is set first
(based on device), then the deltas are applied, and finally the
autosizing masks are applied based upon the offset positions of all of
the child frames - think it through for a bit, it will make sense.
5) Finally, items that were locked to the bottom frame but not the top frame need no deltas at all.
That will give you the identical status bar in iOS7 and iOS6.
On the other hand, if you want iOS7 styling while maintaining iOS6 compatibility, then set the delta Y / delta height values to 0 for the background view.
To see more iOS7 migration info read the full post: http://uncompiled.blogspot.com/2013/09/legacy-compatible-offsets-in-ios7.html
相关文章推荐
- 剑网3练级攻略:纯阳1-30级快速升级
- FREEBSD升级及优化全攻略
- iphone升级ios7之后出现蓝框框一直跳的问题
- QQ农场升级攻略【转】
- [转] FreeBSD升级及优化全攻略
- 详解iOS7升级细节:引领视觉革命
- iPhone, iPad升级ios7正式版教程
- http免费升级https 攻略(超简单)
- 到底该不该上马Vista 中小企业升级全攻略(上)
- 剑网3的快速升级及综合攻略
- VSCode插件开发全攻略(十)打包、发布、升级
- FREEBSD升级及优化全攻略
- FREEBSD升级及优化全攻略
- iphone5 从ios7升级到最新9.2
- 该不该上马Vista 中小企业升级全攻略(下)
- 软件开发的升级打怪攻略
- FREEBSD升级及优化全攻略
- FREEBSD升级及优化全攻略
- MySQL数据库从旧的版本升级为新的版本全攻略
- 技术升级攻略