1. 程式人生 > >UI基礎第十四彈:接使用UITableView Controller

UI基礎第十四彈:接使用UITableView Controller

1 // UITableViewController.h 2 // UIKit 3 // 4 // Copyright (c) 2008-2013, Apple Inc. All rights reserved. 5 // 6 #import <Foundation/Foundation.h> 7 #import <UIKit/UIViewController.h> 8 #import <UIKit/UITableView.h> 9 #import <UIKit/UIKitDefines.h> 10 11 // Creates a table view with the correct dimensions and autoresizing, setting the datasource and delegate to self.
12 // In -viewWillAppear:, it reloads the table's data if it's empty. Otherwise, it deselects all rows (with or without animation) if clearsSelectionOnViewWillAppear is YES. 13 // In -viewDidAppear:, it flashes the table's scroll indicators. 14 // Implements -setEditing:animated: to toggle the editing state of the table.
15 16 NS_CLASS_AVAILABLE_IOS(2_0) @interface UITableViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> 17 18 - (id)initWithStyle:(UITableViewStyle)style; 19 20 @property(nonatomic,retain) UITableView *tableView; 21 @property(nonatomic) BOOL clearsSelectionOnViewWillAppear NS_AVAILABLE_IOS(3_2); //
defaults to YES. If YES, any selection is cleared in viewWillAppear: 22 23 @property (nonatomic,retain) UIRefreshControl *refreshControl NS_AVAILABLE_IOS(6_0); 24 25 @end