-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status Bar overlaps Navigation Bar when bring back app from background #39
Comments
I managed to fix this problem. I had to rewrite the toggle:hide method using the animateWithDuration block instead of UIView beginAnimation. Reason I did this was to take advantage of the "complete" block, because after you animate your bars to hide, you have to make the navigation bar disappear as well (if you don't do it after the animation has completed, it will disappear before the animation takes place). The reason you have to do this is so when the bars reappear, you have to reshow the navigation bar AFTER you show the status bar. The reason for this is for some odd reason (maybe a bug) the navigation bar will put itself at the top of the screen (where the statusbar should be) because it thinks it isn't there. if you reshow the navbar after the statusbar, it sets itself correctly. Anyway, here is the code (I have a tabbar instead of a toolbar): -(void) toggleBars:(BOOL)hide
} |
Actually, there is a bug in the above code. If you double tap while the bars are showing, the nav bar will disappear when it shouldn't. Honestly the solution I'm just going with at this point is to move the navigation bars frame down 20 pixels (y + 20) after you set the status bar to reappear. It's not clean, but it gets the job done until further notice. |
Hi, first off thanks for this code it works great. I noticed one thing though when you're looking at a photo (KTPhotoView). If the bars have disappeared, and you click the home button to exit the app, when you reenter the app, and tap the screen to make the bars reappear, the statusbar will have overlapped the navigation bar.
The text was updated successfully, but these errors were encountered: