我們經常用到的代理方法,大多是tableView必須的實現的,這里這幾個可選的,但用來處理一些小細節是非常方便的。
/tableView將要顯示這個cell觸發
- (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath{
}
//tableView將要顯示頭視圖觸發
- (void)tableView:(UITableView*)tableView willDisplayHeaderView:(UIView*)view forSection:(NSInteger)sectionNS_AVAILABLE_IOS(6_0){
}
//tableView將要顯示尾視圖觸發
- (void)tableView:(UITableView*)tableView willDisplayFooterView:(UIView*)view forSection:(NSInteger)sectionNS_AVAILABLE_IOS(6_0){
}
////當cell滑出屏幕時會觸發此方法
- (void)tableView:(UITableView*)tableView didEndDisplayingCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPathNS_AVAILABLE_IOS(6_0){
}
//tableView已經結束顯示頭文件觸發
- (void)tableView:(UITableView*)tableView didEndDisplayingHeaderView:(UIView*)view forSection:(NSInteger)sectionNS_AVAILABLE_IOS(6_0){
}
//tableView已經結束顯示尾文件觸發
- (void)tableView:(UITableView*)tableView didEndDisplayingFooterView:(UIView*)view forSection:(NSInteger)sectionNS_AVAILABLE_IOS(6_0){
}