繁体   English   中英

当UIViewController中有某些东西时,在调用viewDidLoad时不调用viewWillAppear和viewDidAppear

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

填充UIViewController时遇到一个奇怪的问题。

因此,从根本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];

好吧,我的leftController是故事板上的这个: 在此处输入图片说明在此处输入图片说明

然后这是当它不调用viewDidAppearviewWillAppear却完美调用viewDidLoad

如果我将其清空(因此,当我在主视图中没有任何视图时),它将完美地工作:

在此处输入图片说明

你有什么线索吗?

提前致谢。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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