
*)tableView{
return
3;(你需要的单元数)}//没个单元中的列表行数-
(NSInteger)tableView:(UITableView
*)tableView
numberOfRowsInSection:(NSInteger)section{if
(section
==
0)
return
[arrName
count]
if
(section
==
1)
return
0
if
(section
==
2)
return
[arrTime
count]}
Class : UITableViewDelegate : UITableViewDataSource, UITableViewDelegate
涉及的API:(API的官方详细注释详见本章结尾)
思路:
2.指定哪些 cell 可以进行编辑�
3.指定cell的编辑状态(删除还是插入)
4.选中删除(或插入)状态之后的 *** 作(数据源进行更新, cell删除或插入)
1 . 让TableView 进入编辑状态 (UIViewControll.m)
3.指定cell的编辑状态(删除还是插入) (UITableViewDelegate 协议方法)
4.选中删除(或插入)状态之后的 *** 作(数据源进行更新, cell删除或插入) (UITableViewDataSource 协议方法)
Class: UITableView
Deletage: UITableViewDataSource, UITableViewDelegate
涉及的API:(API的官方详细注释详见本章结尾)
思路:
1.让 TableView 进入或退出 编辑状态
2.指定 tableView 哪些行(cell) 可以移动
3.移动 cell 后的 *** 作: 数据源进行更新
1 . 让 TableView 进入或退出 编辑状态
2.指定 tableView 哪些行(cell) 可以移动 (UITableViewDataSource协议方法)
3.移动 cell 后的 *** 作: 数据源进行更新
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)