tableviews 回顾

一 选择 ViewController 

    分别可以选

  UINavigationController 

  UITabBarController

  UISplitViewController

     其中UINavigationController 就像一叠卡片,如图:

     tableviews 回顾_第1张图片

    实现很简单,就是拖一个controller,注意要设置成initial view controller

    通过push和pop来控制其他viewController,如图:

     tableviews 回顾_第2张图片

     UITabBarController示例:

      tableviews 回顾_第3张图片

    二 tableview

     tableview可以放置在UINavigationController里来实现master-detail view

     viewstyles可以是plain或者group

     tableview的各部件术语:

     plainStyle:

      tableviews 回顾_第4张图片

   groupStyle

    tableviews 回顾_第5张图片

    tableViewCell

    tableviews 回顾_第6张图片

     tableView 必须有delegate和data source

        data source 函数:

       tableviews 回顾_第7张图片

更多参考:

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html

 

 

你可能感兴趣的:(tableview)