ChavezChen / CWLateralSlide

One line of code to integrate 0 coupling side drawer!一行代码集成0耦合侧滑抽屉!
MIT License
1.28k stars 201 forks source link

点击侧滑上的事件页面跳转不了 #36

Open HelloHW opened 6 years ago

HelloHW commented 6 years ago

大大你好,我用的这个框架遇到这样一个问题 window的rootview为A页面(登录页面) 登录成功后pre到B页面,代码如下 MainViewController next = [[MainViewController alloc]init]; UINavigationController nav = [[UINavigationController alloc]initWithRootViewController:next]; [self presentViewController:nav animated:YES completion:nil]; 在B页面上点击显示左侧页面,点击左侧页面的按钮进入下一页报错 Warning: Attempt to present <NextViewController: 0x7ff3a6e17760> on <UINavigationController: 0x7ff3a8035600> whose view is not in the window hierarchy! 这样怎么解决呢

ChavezChen commented 6 years ago

你这个在登陆成功之后得把nav设置为根控制器才可以哦。。。

HelloHW commented 6 years ago

楼主您好,我把nav设置为根视图后点击调用- (void)cw_showDefaultDrawerViewController:(UIViewController *)viewController 方法,报UnRecognized Selector错。没有走到这个方法里