0
我在DataSource类下面的代码在UITableView上触发移动?
public override bool CanMoveRow (UITableView tableView, NSIndexPath indexPath)
{
return true;
}
public override void MoveRow (UITableView tableView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)
{
... code for swapping the location of stuff in a list
}
如何触发“移动”?如果我刷我的UITableView我得到我的删除按钮,但我如何得到'移动'?我是否需要放置一个按钮,然后将表格放入BeginEditting模式?任何示例代码来做到这一点?
[管理行的重新排序](http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/ManageReorderRow/ManageReorderRow.html%23//apple_ref/doc/uid/ TP40007451-CH11-SW1)章节中详细解释了这一点。虽然Objective-C中有示例代码,但它不应该很难转换。 – Anna 2011-03-02 03:33:20