zoukankan      html  css  js  c++  java
  • iOS中控制器的实践和学习(1)抛出UI问题


    【目的】
    在iOS中有这么几类Controller
    1、UINavigationController
    2、UITabBarController
    3、UITableViewController
    4、UIViewController

    如何快速使用xib来关联这些Controller?

    上述4类Controller中,前两类属于导航类控制器,后两类属于控件容器类控制器。
    PS:
    导航类控制器指在应用中起导航作用的控制器,其事件的触发更多的是响应视图的切换。
    控件容器类控制器指应用中,可以放置不同的控件(排除导航类控件外,可使用的有如按钮、图像、标签等);其中UITableViewController是以表格方式放置和呈现而已。

    实际的UI效果如下:
     
      ______________(A1)
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |      UIView         |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
      ______________(A2)
    |                        |
    |        Nav           |
    |_______________|
    |                        |
    |                        |
    |                        |
    |      UIView         |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
      ______________(A3)
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |      UIView         |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
    |                        |
    |        Tab           |
    |_______________|
      ______________(A4)
    |                        |
    |        Nav           |
    |_______________|
    |                        |
    |                        |
    |                        |
    |      UIView         |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
    |                        |
    |        Tab           |
    |_______________|
      ______________(B1)
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |    UITableView    |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
      ______________(B2)
    |                        |
    |        Nav           |
    |_______________|
    |                        |
    |                        |
    |                        |
    |    UITableView    |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
      ______________(B3)
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |                        |
    |    UITableView    |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
    |                        |
    |        Tab           |
    |_______________|
      ______________(B4)
    |                        |
    |        Nav           |
    |_______________|
    |                        |
    |                        |
    |                        |
    |    UITableView    |
    |                        |
    |                        |
    |                        |
    |                        |
    |_______________|
    |                        |
    |        Tab           |
    |_______________|


    从图中可看出,导航类可放2个位置,控件容器类就只有中间一块地盘

    再次回到问题上,如何快速配搭这些Controller?

    无论生活、还是技术,一切都不断的学习和更新~~~努力~
  • 相关阅读:
    jvm的几个概念误区
    JDK动态代理和CGLib动态代理的对比
    mybatis源码解析(连载)
    HashMap源码解析(基于JDK1.8)
    线程池ThreadPoolExecutor——Worker源码解析
    Java线程池原理分析
    装饰器模式在mybatis-cache包中的应用
    rocketMQ手动创建Topic
    JVM误区--动态对象年龄判定
    云上奈飞(三):隐藏在播放按钮下的奥秘(上)
  • 原文地址:https://www.cnblogs.com/GoGoagg/p/2104342.html
Copyright © 2011-2022 走看看