Using long press gesture to reorder cells in tableview?

前端 未结 6 544
灰色年华
灰色年华 2021-02-04 03:35

I want to be able to reorder tableview cells using a longPress gesture (not with the standard reorder controls). After the longPress is recognized I want the tableView to essent

6条回答
  •  别那么骄傲
    2021-02-04 03:48

    So essentially you want the "Clear"-like row reordering right? (around 0:15)

    This SO post might help.

    Unfortunately I don't think you can do it with the present iOS SDK tools short of hacking together a UITableView + Controller from scratch (you'd need to create each row itself and have a UITouch respond relevant to the CGRect of your row-to-move).

    It'd be pretty complicated since you need to get the animation of the rows "getting out of the way" as you move the row-to-be-reordered around.

    The cocoas tool looks promising though, at least go take a look at the source.

提交回复
热议问题