- (nullable __kindof UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath;
//根據(jù)indexPath返回對應(yīng)位置的cell,如果cell不存在返回nil。
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
//返回每組多少行,系統(tǒng)會先調(diào)用兩次,第三次的時候才調(diào)用-tableview:cellForRowAtIndexPath;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
//返回cell單元格,返回nib會導(dǎo)致程序crash。
- (void)insertRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
//在指定的地方插入cell,第一個參數(shù)是入播的地位,第二個參數(shù)是動畫效果。
//調(diào)用這個方法后,系統(tǒng)會調(diào)用-tableView: numberOfRowsInSection;代理方法。如果在調(diào)用該方法之前,數(shù)據(jù)源沒有增加同插入cell個數(shù)等量的數(shù)據(jù),程序會出現(xiàn)crash。
@property (nonatomic, readonly, nullable) NSIndexPath *indexPathForSelectedRow;
// 返回nil或代表部分和行索引路徑選擇。
- (nullable __kindof UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier;
//從復(fù)用池提取Cell,如果復(fù)用池中沒有可用的Cell且registerNib或registerClass注冊cell,會返回一個新的cell,否則會返回nil。
- (__kindof UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath NS_AVAILABLE_IOS(6_0);
//從復(fù)用池提取Cell,如果復(fù)用池中沒有可用的Cell且registerNib或registerClass注冊cell,會返回一個新的cell,否則程序crash。
- (void)registerNib:(nullable UINib *)nib forCellReuseIdentifier:(NSString *)identifier NS_AVAILABLE_IOS(5_0);
//通過Xib注冊cell。
- (void)registerClass:(nullable Class)cellClass forCellReuseIdentifier:(NSString *)identifier NS_AVAILABLE_IOS(6_0);
//通過類注冊cell。
- (void)registerNib:(nullable UINib *)nib forHeaderFooterViewReuseIdentifier:(NSString *)identifier NS_AVAILABLE_IOS(6_0);
//通過xib注冊組頭或組尾。
- (void)registerClass:(nullable Class)aClass forHeaderFooterViewReuseIdentifier:(NSString *)identifier NS_AVAILABLE_IOS(6_0);
//通過類注冊組頭或組尾。