zoukankan      html  css  js  c++  java
  • iPhone开发中从一个视图跳到另一个视图有三种方法:

    iPhone开发中从一个视图跳到另一个视图有三种方法:
     
    1、self.view addSubView:view 、self.window addSubView,需要注意的是,这个方法只是把页面加在当前页面。此时在用self.navigationControler.pushViewController和 pushViewController 是不行的。要想使用pushViewController和popViewController进行视图间的切换,就必须要求当前视图是个NavigationController。
    2、就是使用self.navigationControler pushViewController和popViewController来进行视图切换的,pushViewController是进入到下一个视图,popViewController是返回到上一视图。
    3、没有NavigationController导航栏的话,使用self.presentViewController和self.dismissModalViewController。具体是使用可以从文档中详细了解。
    4、要想使用pushViewController和pushViewController来进行视图切换,首先要确保根视图是NavigationController,不然是不可以用的。这里提供一个简单的方法让该视图或者根视图是NavigationController。自己定义个子类继承UINavigationController,然后将要展现的视图包装到这个子类中,这样就可以使这个视图是个NavigationController了。提供的这个方法有很好的好处,就是可以统一的控制各个视图的屏幕旋转。
  • 相关阅读:
    服务的有状态和无状态
    微服务-服务治理
    微服务-服务注册与发现
    微服务-技术的选型
    微服务的数据一致性
    微服务的服务拆分
    初识微服务
    REST API风格
    算法
    JS 判断PC、android、ios、微信浏览器
  • 原文地址:https://www.cnblogs.com/ygm900/p/3607819.html
Copyright © 2011-2022 走看看