1. There is no way to preserve the iOS 6 style status bar layout. The status bar will always overlap your application on iOS 7

  2. Do not confuse status bar appearance with status bar layout. The appearance (light or default) does not affect how the status bar is laid out (frame/height/overlap). It is important to note as well that the system status bar no longer has any background color. When the API refers to UIStatusBarStyleLightContent, they mean white text on a clear background. UIStatusBarStyleDefault is black text on a clear background.

  3. Status bar appearance is controlled along one of two mutually-exclusive basis paths: you can either set them programmatically in the traditional manner, or UIKit will update the appearance for you based on some new properties of UIViewController. The latter option is on by default. Check your app’s plist value for “ViewController-Based Status Bar Appearance” to see which one you’re using. If you set this value to YES, every top-level view controller in your app (other than a standard UIKit container view controller) needs to override preferredStatusBarStyle, returning either the default or the light style. If you edit the plist value to NO, then you can manage the status bar appearance using the familiar UIApplication methods.

  4. UINavigationController will alter the height of its UINavigationBar to either 44 points or 64 points, depending on a rather strange and undocumented set of constraints. If the UINavigationController detects that the top of its view’s frame is visually contiguous with its UIWindow’s top, then it draws its navigation bar with a height of 64 points. If its view’s top is not contiguous with the UIWindow’s top (even if off by only one point), then it draws its navigation bar in the “traditional” way with a height of 44 points. This logic is performed by UINavigationController even if it is several children down inside the view controller hierarchy of your application. There is no way to prevent this behavior.

  5. If you supply a custom navigation bar background image that is only 44 points (88 pixels) tall, and the UINavigationController’s view’s bounds matches the UIWindow’s bounds (as discussed in #4), the UINavigationController will draw your image in the frame (0,20,320,44), leaving 20 points of opaque black space above your custom image. This may confuse you into thinking you are a clever developer who bypassed rule #1, but you are mistaken. The navigation bar is still 64 points tall. Embedding a UINavigationController in a slide-to-reveal style view hierarchy makes this abundantly clear.

  6. Beware of the confusingly-named edgesForExtendedLayout property of UIViewController. Adjusting edgesForExtendedLayout does nothing in most cases. The only way UIKit uses this property is if you add a view controller to a UINavigationController, then the UINavigationController uses edgesForExtendedLayout to determine whether or not its child view controller should be visible underneath the navigation bar / status bar area. Setting edgesForExtendedLayout on the UINavigationController itself does nothing to alter whether or not the UINavigationController has a 44 or 64 point high navigation bar area. See #4 for that logic. Similar layout logic applies to the bottom of your view when using a toolbar or UITabBarController.

  7. If all you are trying to do is prevent your custom child view controller from underlapping the navigation bar when inside a UINavigationController, then set edgesForExtendedLayout to UIRectEdgeNone (or at least a mask that excludes UIRectEdgeTop). Set this value as early as possible in the life cycle of your view controller.

  8. UINavigationController and UITabBarController will also try to pad the contentInsets of table views and collection views in its subview hierarchy. It does this in a manner similar to the status bar logic from #4. There is a programmatic way of preventing this, by setting automaticallyAdjustsScrollViewInsets to NO for your table views and collection views (it defaults to YES). This posed some serious problems for Whisper and Riposte, since we use contentInset adjustments to control the layout of table views in response to toolbar and keyboard movements.

  9. To reiterate: there is no way to return to iOS 6 style status bar layout logic. In order to approximate this, you have to move all the view controllers of your app into a container view that is offset by 20 points from the top of the screen, leaving an intentionally black view behind the status bar to simulate the old appearance. This is the method we ended up using in Riposte and Whisper.

  10. Apple is pushing very hard to ensure that you don’t try to do #9. They want us to redesign all our apps to underlap the status bar. There are many cogent arguments, however, for both user experience and technical reasons, why this is not always a good idea. You should do what is best for your users and not simply follow the whimsy of the platform.

IOS7 APP 升级的10个TIP 建议的更多相关文章

  1. App升级iOS7体会

    本文转自App升级iOS7体会. xcode5 GM版已经发布,虽然还是pre-release版,但离最终版不远了.对于没有用到新特性的app面临的最大问题就是UI的变化.Apple提供了UI Tra ...

  2. Linux下Oracle 10.2.0.1升级到10.2.0.4总结

    最近部署测试环境时,将测试环境ORACLE数据库从10.2.0.1升级到了10.2.0.4,顺便整理记录一下升级过程. 实验环境: 操作系统:Oracle Linux Server release 5 ...

  3. 【Oracle】10.2.0.1升级到10.2.0.5

    升级数据库到10.2.0.5   因是测试环境,不需要备份:如是生产系统,建议进行全备份后再进行升级操作,预防数据丢失造成不必要的影响.   步骤: 上传并解压补丁,安装前准备,安装补丁,预升级检查, ...

  4. 升级Windows 10 正式版过程记录与经验

    升级Windows 10 正式版过程记录与经验 [多图预警]共50张,约4.6MB 系统概要: 预装Windows 8.1中文版 64位 C盘Users 文件夹已经挪动到D盘,并在原处建立了符号链接. ...

  5. CENTOS 6.4 安装oracle 10g,手工建库及升级到10.2.0.5

    一. 数据库软件安装 参照官方手册 1.安装rpm包 注这里的yum直接用163的yum yum -y install binutils compat-libstdc++-33 compat-libs ...

  6. Android 优化APP 构建速度的17条建议

    转载:http://www.jianshu.com/p/a1cc8f2e0877 较长的构建时间将会减缓项目的开发进度,特别是对于大型的项目,app的构建时间长则十几分钟,短则几分钟,长的构建时间已经 ...

  7. Oracle数据库版本10.2.0.1升级到10.2.0.3(转)

    Oracle数据库版本10.2.0.1升级到10.2.0.3 1.停止OEM/isqlplus/监听/DB实例 $ emctl stop dbconsole $ isqlplusctl stop $ ...

  8. rac 10g 10.2.0.1升级到10.2.0.5具体解释

        RAC 10.2.0.1 升级到 10.2.0.5 一. 准备: Patch 包:p8202632_10205_LINUX.zip   节点数:3个节点       RAC1    RAC2  ...

  9. oracle 之 安装10.2.0.1 且 升级到 10.2.0.4

    一. centos 6.5 安装 oracle 10.2.0.1 1.安装操作系统,选择桌面环境 2.配置本地yum源 , 可参考 http://blog.csdn.net/zhang12345645 ...

随机推荐

  1. HDFS2.0之简单总结

    新特性 NameNode支持HA 命名空间支持分区(Federation) 支持ViewFS 支持目录快照 支持权限ACL 支持缓存指定的文件 QJM实现名字节点HA (图片来源互联网) 命名空间分区 ...

  2. 多Tabs的横向滚动插件(支持Zepto和jQuery)

    一. 效果图 二. 功能介绍 1. 支持横向移动 2. 支持点击Tab后该Tab居中 3. 拉到最左边和最右边后依然可以拉动,只是tabs的移动距离变小. 三. 使用说明 1. 在你的html中添加T ...

  3. vsftpd conf 解釋

    Linux中vsFTP位置约定:/usr/sbin/vsftpd ---- VSFTPD的主程序/etc/rc.d/init.d/vsftpd ---- 启动脚本/etc/vsftpd/vsftpd. ...

  4. Ambari-Blueprint介绍

    Ambari-Blueprint总体介绍 ambari-blueprint主要作用是通过提供一个restAPI.调用几次API就能够创建一个集群.ambari-server解析stack下的role_ ...

  5. jQuery -> 获取/设置HTML或TEXT内容

    jQuery提供了两个API能够直接用来为元素加入内容. html() text() 当中html()是为指定的元素加入html内容 text()是为指定的元素加入文本内容 两者的差别在于,text中 ...

  6. C++类库

    转载自:http://blog.csdn.net/Augusdi/article/details/8989763 基础类 一.C++标准库 1. Dinkumware C++ Library 参考站点 ...

  7. Android应用程序相关的文件文件夹具体解释

    一.方法介绍:         每一个Android应用程序都能够通过Context来获取与应用程序相关的文件夹,这些文件夹的功能各异,每一个文件夹都有自己的特点.有时候可能会搞混淆,本文结合andr ...

  8. 【C语言】编写函数实现库函数atof

    //编写函数实现库函数atof #include <stdio.h> #include <assert.h> #include <ctype.h> #include ...

  9. Server Tomcat v8.0 Server at localhost failed to start.

    怎么办? 查资料的话别人会告诉你须要删除一个东西.这是一种方法.可是你的错误并不是通过这种方法能够解决. 比方像我 <url-pattern>login</url-pattern&g ...

  10. 布局技巧4:使用ViewStub

    多亏了<include />标签,在Android里,很容易就能做到共享和重用UI组件.在Android开发中,很容易就能创建出复杂的UI结构,结果呢,用了很多的View,且其中的一些很少 ...