edgecase/ECSlidingViewController — pull request #177 by enriquez (2013-09-24 06:43:42+00:00)
Title: Status bar fixes for iOS 7

Upgrading from iOS 6 to 7 changed the layout of the status bar and views. The status bar is now transparent and the views are full screen. This can cause a problem with the status bar overlapping with content at the top of the views.

To help with this problem, there are two additions to the API:

/** Specifies if the the child views should be shortened to accomodate the status bar.

By default, this is set to NO
*/
@property (nonatomic, assign) BOOL shouldAdjustChildViewHeightForStatusBar;

/** A view that is the same size and position as the status bar

It is guaranteed to always be on top of the top and under views.

*/
@property (nonatomic, strong) UIView *statusBarBackgroundView;

Most apps can easily transition to iOS 7 by setting `shouldAdjustChildViewHeightForStatusBar` to `YES` and adding a background color to `statusBarBackgroundView`. The example app does this.

Apps designed with iOS 7 in mind and full screen views can take advantage of `statusBarBackgroundView` by updating it to match the currently active view. The transitions can be updated by using the `topViewCenterMoved` block. The behavior of the Facebook app can be replicated by transitioning the background color from transparent to black.