UITTableView滑动删除
来源:互联网 发布:mac语音播报怎么关闭 编辑:程序博客网 时间:2024/06/03 23:44
代码:
#pragma mark-tableView的删除代理方法
-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
returnYES;
}
//返回编辑类型
- (UITableViewCellEditingStyle )tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
returnUITableViewCellEditingStyleDelete;
}
//编辑操作
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle ==UITableViewCellEditingStyleDelete)
{
//删除行
//1.删除数据源
//2.界面上删除cell
teleModel *model =self.datasources[indexPath.row];
//数据删除
[[DatabaseManagersharedManager]deleModel:model];
[self.datasourcesremoveObjectAtIndex:indexPath.row];
//直接刷新表格,没有动画
[tableView reloadData];
}
}
- UITTableView滑动删除
- 滑动删除
- 滑动删除
- 滑动删除
- 滑动删除
- ios开发-UITtableView的使用
- 滑动删除uitableview cell
- UITableView 实现滑动删除
- UITableView 滑动删除数据
- IOS 手指滑动删除
- UITableView 滑动删除
- 滑动删除row
- UITableView滑动删除
- 实现listView滑动删除
- ListView 滑动删除效果
- listview滑动删除
- listView滑动删除
- list滑动删除item
- STM32F1之UART
- HTML5 表单属性
- hdu3572(网络流)
- mac安装windows虚拟机
- 【Android官方文档】翻译Android官方文档-Fragment(四)
- UITTableView滑动删除
- Notice: Undefined variable
- AAA Xms Xmx PermSize MaxPermSize 区别
- 如何使用 QUnit 进行 JavaScript 单元测试
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks----论文笔记
- 华为机试题—在字符串中找出连续最长的数字串 c++
- 最小生成树(kruskal算法,prim算法)
- Linux环境下Solr6部署文档
- iOS开发 - 第03篇 - 多线程 - 02 - GCD & 单例 & NSOperation