【问题标题】:how to perform a custom move of UITableViewCell?如何执行 UITableViewCell 的自定义移动?
【发布时间】:2012-06-28 00:11:33
【问题描述】:

我想像这两种方法一样移动单元格:

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath;
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath;

在我使用上面的这些方法移动单元格(通过用户的触摸动作)之前,必须首先调用 tableView 的 setEditing:animated:。

但我想要的是用户长按然后拖动一个单元格来移动它而不进入编辑样式,我希望这些移动视图不会出现在单元格的右边,像这样:

有什么建议吗?特别感谢!

【问题讨论】:

标签: iphone uitableview uikit


【解决方案1】:

一种解决方案:http://b2cloud.com.au/how-to-guides/reordering-a-uitableviewcell-from-any-touch-point

但它不能使用长按手势开始拖动

我们可以使用FMMoveTableView 来做到这一点。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-08-18
    • 1970-01-01
    • 2018-07-06
    • 2017-09-23
    • 2015-01-08
    • 1970-01-01
    • 2021-05-17
    • 2017-05-29
    相关资源
    最近更新 更多