I'm using MMDrawerController, but got a problem: When left/right menu (drawer) is opened first time (after app launched) its content is shifted down after displayed. Please see image below (sorry for the big image but slow motion makes it easier to see this problem). This image is captured from sample app of MMDrawerController: KitchenSink

- 571
- 7
- 14
2 Answers
It's because of the status bar, I heard. Try this fix:
The first time either a left or right view controller is displayed, its content appears to be pushed down and into place once the VC is finished animating in. This looks like an issue with MMDrawerController as well. The comment here seems to fix it. The short and sweet is this:
Add the following line to the viewWillAppear:animated method of your SideViewController:
self.navigationController?.view.layoutSubviews()
So it looks something like this:
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
// Workaround for DrawerController issue with iOS 8
self.navigationController?.view.layoutSubviews()
}
Source: https://github.com/sascha/DrawerController/issues/12

- 56
- 5
-
1Thank you, that fixes my problem. – Yaiba Apr 13 '16 at 15:59
please put below code in viewdidload and your issue will be solve
self.automaticallyAdjustsScrollViewInsets=false
and dont forgot to accept answer if you get your answer

- 183
- 11