UITableViewController
UITableViewController
?
目錄
- 概述
- UITableView
- UITableViewCell
- 與UITableViewController相關(guān)的代理
UITableViewDataSource
UITableViewDelegate
- UITableViewController的常用操作
選中單元格
編輯、移動(dòng)、添加、刪除單元格
索引的創(chuàng)建
根據(jù)關(guān)鍵字排序
下拉或上拉刷新表格視圖
搜索框和表格視圖的交互
?
概述
對(duì)UITableViewController的理解
?
UITableView
視圖控制器
UITableViewController或其子類
非UITableViewController或其子類,需手動(dòng)設(shè)置UITableView的dataSource和delegate這兩個(gè)代理
?
UITableViewCell
樣式
系統(tǒng)自帶UITableViewCell樣式
自定義UITableViewCell樣式
?
與UITableViewController相關(guān)的代理
UITableViewDataSource
UITableViewDelegate
?
UITableViewController的常用操作
選中單元格
相關(guān)的代理方法(4個(gè)):- (void)tableView:(UITableView?*)tableView?didSelectRowAtIndexPath:(NSIndexPath?*)indexPath
?
編輯、移動(dòng)、添加、刪除單元格
編輯
-?(void)setEditing:(BOOL)editing animated:(BOOL)animate
刪除
-?(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
-?(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
添加?
+?(NSIndexPath *)indexPathForRow:(NSInteger)row inSection:(NSInteger)section?
-?(void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
移動(dòng)
-?(BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
-?(void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
?
索引的創(chuàng)建
?
?
轉(zhuǎn)載于:https://www.cnblogs.com/IOS-Developer/p/4245625.html
總結(jié)
以上是生活随笔為你收集整理的UITableViewController的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: MySQL纯透明的分库分表技术还没有
- 下一篇: 【opencv】opencv在图片、视频