zoukankan      html  css  js  c++  java
  • Status Bar in iOS7

    This is a very important change in iOS 7: the status bar is no longer a separate bar. It’s now something that simply gets drawn on top of your view controllers. In previous versions of iOS, if your app displayed the status bar the height of the view controller’s view was reduced to compensate — especially if it contained a navigation bar. In iOS 7, your view controllers are always supposed to fill the entire screen.

    If your app has content near the top of the screen but no navigation bar, then you have a problem on your hands, as the status bar will draw on top of that content. That’s exactly what’s happening on the Map Detail screen. There are three possible ways to handle this:

    • Move your content down by 20 points and make room for the status bar. This is the easiest solution, but it doesn’t work very well if your content is embedded in a scroll view or relies on a table view.

    • Implement the prefersStatusBarHidden method in your UIViewController subclass, and return YES to hide the status bar. The problem with this approach is that a user wants to keep the status bar visible in most non-game apps. 

    • Add a navigation bar on top, either by embedding the view controller inside a navigation controller, or by adding your own instance of UINavigationBar. The navigation bar will extend under the status bar. Your content will still sit under these two bars, but the navigation bar will blur it. This is the approach you’ll take in this tutorial. 

    --------iOS_7_by_Tutorials_1_1/Chapter 7: Transitioning to iOS 7 – What’s New with Auto Layout  Page.244

  • 相关阅读:
    事件回顾
    把时间花在经典上
    事件回顾
    硬件毛刺
    事件回顾
    cache支持三种pre-fetch方式:normal/pre-fetch1/pre-fetch2-way1/pre-fetch-way2
    cache支持single/increment/increment4三种方式传输
    计算机必读书籍
    那些让我们如此享受的慢性毒药(转载)
    平淡节制
  • 原文地址:https://www.cnblogs.com/scaptain/p/4076195.html
Copyright © 2011-2022 走看看