zoukankan      html  css  js  c++  java
  • iOS界面之间的跳转方式

    iOS界面之间的跳转方式基本有3种。
    1、改变window的根视图
    
      [self.window setRootViewController:VC];
    
    2、模态弹出
    
         [self  presentViewController:nextVC  animated:YES completion:nil];//从当前界面到nextVC
         [self dismissViewControllerAnimated:YES completion:nil];//从nextVC界面回去
    
    3 用 UINavigationController push 进来和pop回去
    
         [self.navigationController pushViewController:nextVC animated:YES];//从当前界面到nextVC这个界面
         [self.navigationController popViewControllerAnimated:YES];//nextVC这个界面回到上一界面
         [self.navigationController popToRootViewControllerAnimated:YES];//回到根视图界面
    
         //self.navigationController.viewControllers 是一个数组里面存放所有之前push过来的界面,如果想要跳回到指定界面 只需要根据索引值取出响应的界面pop回去
    
    
         MainViewController *MainVC =self.navigationController.viewControllers[1];
         [self.navigationController popToViewController:MainVC animated:YES];
  • 相关阅读:
    Pillar
    Minion配置文件
    Master配置文件
    Grains
    常见的散列函数
    数据结构散列表
    转载:数据结构 二项队列
    转载:数据结构 左式堆
    数据结构 d-堆
    二叉堆的简单介绍
  • 原文地址:https://www.cnblogs.com/Free-Thinker/p/7729321.html
Copyright © 2011-2022 走看看