5. TableviewCell
row tableViewCell . 4 .
image is allowed image is not allowed image is not allowed
image is allowed
subtitle subtitle right aligned main title is in blue
subtitle left aligned
6. • UITableViewController Class :
UITableViewDelegate & UITableViewDataSource
, , TableView
.
• UITableView Class :
• UITableViewCell Class : row
7. Cell Object
disclosure indicators, detail disclosure controls, control objects such as sliders or
switches, and custom views
, (reordering)
.
15. XCode
Navigation-based application template
1. In Xcode, choose New Project from the File menu.
2. Select the Navigation-based Application template project and click Choose.
3. Specify a name and location for the project and click Save.
RootViewController : datasource, delegate
MyTableViewAppDelegate : application
delegate
MainWindow.xib:
RootViewController.xib:
17. root view controller’s nib for view
document window Root View
Controller object .
NIB Name RootViewController
.
root view controller
root view controller NIB Name
RootViewController.Nib
.
18. RootViewController.xib
RootViewController table view
, File’s Owner
(RootViewController)
.
tableView (UITableViewController Class)
Returns the table view managed by the controller object.
@property(nonatomic, retain) UITableView *tableView
view property inherited from UIViewController
TableView property
dataSource
The object that acts as the data source of the receiving table view.
@property(nonatomic, assign) id<UITableViewDataSource> dataSource
Discussion
The data source must adopt the UITableViewDataSource protocol. The data source is not retained.
RootViewController
delegate Table View property
The object that acts as the delegate of the receiving table view. TableView dataSource protocol delegate protocol
@property(nonatomic, assign) id<UITableViewDelegate> delegate RootViewController .
Discussion
The delegate must adopt the UITableViewDelegate protocol. The delegate is not retained.