[英]viewWillAppear and viewDidAppear not called while viewDidLoad called when something is in the UIViewController
I'm having a strange problem when populating a UIViewController
. 填充
UIViewController
时遇到一个奇怪的问题。
So, from the root, I'm making a Drawer in my app with MMDrawerController
like: 因此,从根本
MMDrawerController
,我正在使用MMDrawerController
在我的应用程序中制作一个Drawer:
self.drawerController = [[MMDrawerController alloc]
initWithCenterViewController:centerController
leftDrawerViewController:leftController
rightDrawerViewController:nil];
self.drawerController.openDrawerGestureModeMask = MMOpenDrawerGestureModeAll;
self.drawerController.closeDrawerGestureModeMask = MMCloseDrawerGestureModeAll;
[self.drawerController setDrawerVisualStateBlock:[MMDrawerVisualState slideVisualStateBlock]];
self.drawerController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:self.drawerController animated:YES completion:NULL];
well, my leftController
is this one on the storyboard: 好吧,我的
leftController
是故事板上的这个:
and then this is when it doesn't call viewDidAppear
and viewWillAppear
but viewDidLoad
is called perfectly. 然后这是当它不调用
viewDidAppear
和viewWillAppear
却完美调用viewDidLoad
。
if I empty it (so, when I don't have any view inside the main view) it works perfectly: 如果我将其清空(因此,当我在主视图中没有任何视图时),它将完美地工作:
do you have any clue? 你有什么线索吗?
Thanks in advance. 提前致谢。
删除整个情节提要板并重做即可解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.