Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Technical Q&A QA1723
Views incorrectly draw underneath the status bar
Q: Why does my view controller draw under the status bar?
A: If your view controller is the primary content to your UIWindow, this can occur when either not setting UIWindow's rootViewController property, or the view controller's "Layout" setting "Resize view From NIB" is NOT checked in Interface Builder.

Listing 1 Setting UIWindow's rootViewController property
if ([self.window respondsToSelector:@selector(setRootViewController:)]) |
self.window.rootViewController = viewController; |
Document Revision History
| Date | Notes |
|---|---|
| 2012-02-07 | New document that describes the conditions that can cause views to draw underneath the status bar. |
Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-02-07