简体   繁体   中英

viewWillAppear and viewDidAppear not called while viewDidLoad called when something is in the UIViewController

I'm having a strange problem when populating a UIViewController .

So, from the root, I'm making a Drawer in my app with MMDrawerController like:

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: 在此处输入图片说明在此处输入图片说明

and then this is when it doesn't call viewDidAppear and viewWillAppear but viewDidLoad is called perfectly.

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.

删除整个情节提要板并重做即可解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM