-
Notifications
You must be signed in to change notification settings - Fork 147
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
UINavigationController in menuViewController overlaps status bar #22
Comments
I'm having the opposite problem. Using the navigation controller in the mainViewController. Occasionally, when I dismiss modal from my menuVC and close the side menu, the status bar will overlap the navigationbar. Seems like the navigationbar frame y coordinate starts at 0 instead of 20. The only way to fix this is to fire off another modalVC and dismiss it. Edit: Here's what I've noticed also. Since the modalVC that fires off from my menuVC is a login screen, somehow when I cancel the modal, it never gives this problem. However, when I log in successfully and dismiss my modal, occasionally it happens. It's also not like the y coordinate of the navigationbar is wrong. The navigationbar y coordinate is always 0, but what's causing the problem is the height of the navigationbar has changed from 64 to 44. |
@duncsand Putting a navigation controller in the menu side I can see why this would need to be nudged. The controller makes no assumptions about the contents of the view controller you put in there. I suppose we could add some insets that can be applied to the content areas of either side. @auto234875 I think I've fixed this in a branch working on rotation fixes. I'll be working on getting this merged so maybe that helps your problem. I'll check back in when it is merged. |
@jnjosh I'll definitely look at it. Right now, I'm limiting my mainVC to portrait because of the previous issue I reported. This is causing I lot of problem because some of my other VC on the stack has to be in landscape and I can't figure out how to force auto-rotation when they pop back to the rootVC (mainVC). |
@auto234875 You can check out the menu_display_issue branch. It is a work in progress but it involved a lot of updates for rotation and landscape. |
@jnjosh Thanks, I will look into it. http://imgur.com/vVaGXQs I'm finding out that this issue arises whenever modal is getting dismissed from my menuVC. For example, my settingVC which is modal, if I dismiss it without making any change. Everything goes well. But if I make a change, like disable pocket (read it later feature) and reenable it, which takes me outside the app to login, now if I dismiss the modalVC, I'll get the problem with the navigation bar. At this point, if I exit the app with the home button and go into it again, I can actually see the 20px change appearing and my navigationbar grows to the proper height. |
Well guys, I hacked around my problem. But it's not the preferred solution. What I did was close the sideMenuVC and fire off the modal segue from my mainVC instead of from the menuVC. The status bar issue is taken care of, after doing this, I can't get replicate it anymore. |
@jnjosh I got the NavController working by nudging the menuController down 20pts and adding a 20pt filler view above in the updateMenuViewWithTransform method. It seems a bit of a hack though - the content doesn't scroll under the status bar, as the menuController is now 20pts lower. In iOS7 normally the system detects the presence of a UINavigationController and does all this automatically, making sure the content scrolls under the status bar. I'm not sure why this isn't happening here - presumably something to do with the view hierarchy that's confusing things. |
I have the same problem. It happens with me specifically after this sequence of events:
Then the navigation bar starts overlapping with the status bar. A typical cenario is Facebook login. I worked around this, but it's a little ugly and I'm not proud. Basically I removed the modal view after going to background and then put it back before going foreground. So in AppDelegate:
|
@KeepWalkingBR thanks for your solution! |
I'm using a UINavigationContoller in the menuViewController. This works great, but the navigation controller overlaps the phone's status bar - it needs to be nudged down by 20 pixels.
The text was updated successfully, but these errors were encountered: