Navigation bar from leftDrawerController snaps at first open
Hello and congratulations for the great work on the framework.
When you first open the left drawer (I'm not using the right one, but I guess it happens for that as well), the navigation bar "snaps" a hefty bunch of pixels from the top into its place. I repeat, only for first open. The subsequent ones have no effect.
Can you reproduce this issue in the example project? If not, can you push up an example of the problem?
Thanks!
Are you hiding the status bar in your center or side drawer view controllers? I see this as well. Duplicate in the example project by adding the following in MMExampleCenterTableViewController.m, MMExampleSideDrawerViewController.m, or both.
-(BOOL)prefersStatusBarHidden
{
return YES;
}
I'm currently looking to see if any pull requests have addressed this.
@kcharwood, it could be reproduced in the MMDrawerControllerKitchenSink project (tag 0.5.6) for the rightDrawerController. But it happens if only landscape orientation is allowed.
Steps to reproduce:
- Clear Portrait and Upside Down flags in the Device Orientation settings
- Launch iPhone app in iOS Simulator
- Press the button (don't use gestures) to open the right drawer. The navigation bar snaps when the right drawer is opened first time.
thanks @viacheslavkorotaiev
I can reproduce that.
I'm working on an update for iOS 8, and can reproduce the problem in my app in my left drawer consistently, regardless of rotation/orientation settings. I downloaded the Sample Project, and was able to reproduce the problem in that project as well as long as I built against iOS 8.
It looks like the first time you open either drawer, the first table header grows in height by about 40px, which causes the visual jump other users have reported.
I'm seeing this issue or something similar to this while working with iOS 8. I have a UINavigationController holding a UICollectionViewController as my right drawer. When I open the drawer the first time, the content of the collection view visibly snaps down into place below the nav bar. Doesn't happen on subsequent opens. It seems to be related to the automaticallyAdjustsScrollViewInsets property on UIViewController. If I disable that in viewDidLoad and manually set the the contentInset of my collection view (64px in my case), the issue goes away. This isn't ideal, of course.
Same here when built with iOS 8. But if you drag to open side drawer the first time, there's no issue at all.
Same here. Happens on iOS 8.1 on programmatically opening the left drawer. Still no solution for this from anyone?
I have found a workaround to fix this. Simply add the following line to your viewWillAppear in your sidebar controller:
Swift: self.navigationController?.view.layoutSubviews()
ObjC: [self.navigationController.view layoutSubviews]
Good luck!
Yes, it's work @Dschee Many thanks!
Thanks @Dschee