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?
posted @ 2011-07-12 15:49  西就东城  阅读(424)  评论(0编辑  收藏  举报