Skip to content

Conversation

pedroscocco
Copy link

This change creates 3 possible states for the status bar background view.
MMStatusBarBackgroundViewModeNone: The same as showsStatusBarBackgroundView set to NO.
MMStatusBarBackgroundViewModeOpaque: The same as showsStatusBarBackgroundView set to YES.
MMStatusBarBackgroundViewModeVariable: In this mode, the background view only appears when the drawer is open, with an alpha animation when closing and opening. This mimics the behaviour of the facebook app when opening the contacts drawer.

I Created 2 methods, showsStatusBarBackgroundView and setShowsStatusBarBackgroundView:, for backwards compatibility, so this change doesn't break working apps.

Also changed the example app to demonstrate this new feature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the method name

@kcharwood
Copy link
Contributor

Nice work here! I'd like to get this merged in in the next couple of weeks (WWDC will slow me down).

@kcharwood kcharwood added this to the 0.6.0 milestone May 28, 2014
@kcharwood
Copy link
Contributor

The README will also need some TLC.

@pedroscocco
Copy link
Author

Hi there, I'm glad you liked it. I fixed the typo and made some changes to the README to better explain the new feature. Hope you have a good time at WWDC!

@danmartyn
Copy link

On iOS 7, this works perfectly for me, in Portrait and Landscape. However, on iOS 8, when I move to Landscape, the status bar gets hidden. I made a change so on rotation, I change the statusBarBackgroundViewMode to MMStatusBarBackgroundViewModeNone for Landscape and MMStatusBarBackgroundViewModeVariable for Portrait. If I have the drawer hidden, rotate and show it, this works perfectly. The problem is when the drawer is opened and the device rotates:

In Landscape, the status bar is hidden properly, and all is well.
In Portrait: The status bar content comes back, but the status bar background colour is not being set properly, so the white content gets lost in my white navigation bar.

Any ideas how I could fix this?

@pedroscocco
Copy link
Author

Yup, I tested the demo in the iOS8 simulator and it's really broken. In iOS8 there are some changes regarding orientation and rotations, it might have something to do with that. I'll look into it over the weekend.

@danmartyn
Copy link

Hey @pedroscocco, any luck in finding a solution for the problems with iOS 8?

@kcharwood kcharwood removed this from the 0.6.0 milestone Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants