tableView的幾個常用代理方法

我們經常用到的代理方法,大多是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){

}

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容