码迷,mamicode.com
首页 > 其他好文 > 详细

pop&dismiss

时间:2018-06-13 16:33:25      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:pop   界面   smi   app   EDA   color   for   指定   svi   

1 //dismiss到根视图
2 - (void)dismissToRootViewController{
3     UIViewController *vc = self;
4     while (vc.presentingViewController) {
5         vc = vc.presentingViewController;
6     }
7     [vc dismissViewControllerAnimated:YES completion:nil];
8 }
1     //dismiss到指定界面
2     UIViewController *vc =self.presentingViewController;
3     while (![vc isKindOfClass:[[UIApplication sharedApplication].keyWindow.rootViewController class]]) {
4         vc = vc.presentingViewController;
5     }
6     [vc dismissViewControllerAnimated:YES completion:nil];
  [self.navigationController popToRootViewControllerAnimated:YES];//pop到根视图
1   for (UIViewController *controller in self.navigationController.viewControllers) {
2         if ([controller isKindOfClass:[WekeWordLockViewController class]]) {
3             WekeWordLockViewController *vc = (WekeWordLockViewController *)controller;
4             [self.navigationController popToViewController:vc animated:YES];
5         }
6     }

 

pop&dismiss

标签:pop   界面   smi   app   EDA   color   for   指定   svi   

原文地址:https://www.cnblogs.com/wycstudy/p/9178220.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!