簡體   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