JoeFryer / JDFPeekaboo

JDFPeekaboo is a simple class that hides the navigation bar when you scroll.
MIT License
292 stars 41 forks source link

present a status bar hidden controller view will cause the status bar complete transparent #13

Closed dreamgo closed 7 years ago

dreamgo commented 9 years ago

I present a status bar hidden view2(use setStatusBarHidden:YES withAnimation ) from view1, which enable scrolling hidden nav bar. However, It will cause view1's status bar completely transparent . Any idea to fix it? Thanks! screen shot 2015-04-30 at 12 45 03 am

JoeFryer commented 9 years ago

Hi @dreamgo - would you be able to provide a simple demo showing this behaviour? It's a little difficult to understand the exact scenario.

dreamgo commented 9 years ago

Sorry for the confused explain. I apply your library on my home ViewController, everything works well. And there is an image picker controller in my project, and I add following code in viewdidload() to hide its status bar: [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];

In home ViewController, when I switch to the image picker View with following code it will cause home ViewController status bar completely transparent. [self presentViewController:ImagePickerView animated:YES completion:NULL];

How can I solve this problem? Thanks!

JoeFryer commented 9 years ago

Hi @dreamgo - I've pushed a small fix that's related to this, but there are still some things you need to do to get this to work. Firstly, you need to hide the status bar in viewWillAppear/viewDidAppear, not viewDidLoad. Also, you need to disable JDFPeekaboo while the view controller with the hidden status bar is on screen (with the enable/disable methods - see the demo project for an example).