IOSMMDrawerController的左侧菜单table视图内容显示后下移
IOS MMDrawerController's left menu table view content is shifted down after displayed
我正在使用 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
听说是因为状态栏。
试试这个修复:
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()
}
请在 viewdidload 中输入以下代码,您的问题将得到解决
self.automaticallyAdjustsScrollViewInsets=假
如果你得到答案,不要忘记接受答案
我正在使用 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
听说是因为状态栏。 试试这个修复:
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()
}
请在 viewdidload 中输入以下代码,您的问题将得到解决
self.automaticallyAdjustsScrollViewInsets=假
如果你得到答案,不要忘记接受答案