0
A
回答
2
在数据shource实现moveRowAtIndexPath:toIndexPath:
的方法更新结束模型的拖动操作。执行tableView:canMoveRowAtIndexPath:
以返回YES
用户应该能够移动的行。 Here是关于这个主题的简短教程。
2
您需要实现在您的视图控制器来使用这些数据源的方法:
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
和
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath
{
//update your model to reflect the fact that the specified rows indexes have been swapped
}
相关问题
- 1. 拖动UITableView
- 2. 拖动UITableView
- 3. 的UITableView拖放与不动细胞
- 4. iPhone UITableView行拖拽移动
- 5. UITableView在拖动时缓慢
- 6. 从uitableview拖动图像
- 7. UITableView拖动UIRefreshControl的距离
- 8. UIView的弹性拖动像从UITableView的顶部拖动
- 9. UIView与UITapGestureRecognizer通过拖动到它下面的UITableView?
- 10. 的UITableView与值拾取器可拖动的行
- 11. UITableView contentOffset在拖动时发生变化
- 12. NSTimer在拖动UITableView时不工作
- 13. JQuery UI可拖动与Wijmo拖动
- 14. 将项目从UITableView拖放到UITableView
- 15. UI不与拖动
- 16. 拖动与Commonsware TouchListView
- 17. ExtJS的拖动与滚动
- 18. 外观与HTML5拖动可拖动的项目的拖放
- 19. 在iOS应用中拖动UITableViewCells时自动滚动UITableView
- 20. 将UITableCell拖放到UITableView上
- 21. UITableView与UITextField,错误滚动
- 22. UitableView滑动菜单与uiimage
- 23. 滚动的UILabel与UITableView的
- 24. 自动布局与UITableView的
- 25. UITableView与活动指示器
- 26. UITableView与HeaderView不滚动
- 27. 拖动滚动的UITableView本身而不是其内容
- 28. UITableView拖动块的所有其他动画
- 29. 在拖动期间暂时禁用UITableView滚动
- 30. 如何停止滚动/拖动我的UITableView边界?