UITableView中cell的移动和删除
一.cell的删除
1.添加delegate方法

其中dataArray为可变模型数组,
2.删除
拖动Cell向左滑动,出现一个delete的指示,点击从dataArray中删除指定行数据(图为1组),刷新数据即可删除当前cell.

二.cell的移动
1.实现代理方法,方法中不用写任何代码

2.修改edit属性

3.运行,点击cell右边的三条线就可以移动位置了

三.下拉刷新
使用UITableViewController自带的类UIRefreshControl,将storyboard中的viewController的属性Refreshing改为Enable,

设置下拉属性的渲染颜色和刷新数字


四.刷新指定组
例:刷新第0组

网友评论