Deleting rows in table view Checklist
来源:互联网 发布:google linux翻墙插件 编辑:程序博客网 时间:2024/05/18 09:13
//enable swipe-to-delete- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ [items removeObjectAtIndex:indexPath.row]; //delete the corresponding row from the table view NSArray *indexPaths = [NSArray arrayWithObject:indexPath]; [tableView deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationAutomatic];}
When the commitEditingStyle method is present (it comes from the table view data source), the table view will automatically enable the swipe-to-delete.
All we have to do is remove the item from our data model and delete the corresponding row from our table view.
- Deleting rows in table view Checklist
- Calling sequence for inserting or deleting rows in a table view
- Deleting Duplicate Rows
- Dragging and dropping table rows in Javascript
- delete duplicate rows in a table
- Deleting large number of rows
- Delegates in table view
- Get the rows count of all the table in Sybase
- Update large number of rows in a table [ID 268395.1]
- SQL Tips: How to detect duplicate rows in table
- Fastest way to estimate rows in a table
- UITableView(Inserting and Deleting Rows and Sections)
- Getting all selected rows in ADF Table with multiple rows selection enabled
- Entity Framework: duplicate rows in resultset from a view
- Error in deleting blocks.
- About Checklist in Testing
- Fastest Way to Update Rows in a Large Table in SQL Server
- UITableView(Inserting and Deleting Rows and Sections)
- 茎叶图
- MySQL数据库引擎介绍、区别、创建和性能测试
- struts2 注解 demo2
- USB开发学习日记-01
- ProgressBar 圆形进度条颜色的设置
- Deleting rows in table view Checklist
- org.springframeword.util.Asert用法
- DevExpress 如何使用外键
- struts2的注解功能
- 关于tomcat一点细节
- 小笔记,在windows和linux下分开编译、在C\C++下都使用C风格编译
- win7 旗舰版 64位安装 oracle10g 32位
- Google翻译 API关闭后的调用方法
- 解决Myeclipse 10 编译html jsp报错的问题