开发者

move row from UITableView to second UITableView

开发者 https://www.devze.com 2023-03-22 02:57 出处:网络
I have 2 UIT开发者_如何转开发ableView, my scenario is that I want to move row from first UITableView to second UITableView. I need help.If you do not need drag/drop functionality(animations) then all

I have 2 UIT开发者_如何转开发ableView, my scenario is that I want to move row from first UITableView to second UITableView. I need help.


If you do not need drag/drop functionality(animations) then all you need to do is change the data in the individual data-sources for the two table-views and reload them both! This can be triggered , for eg, by a button. The data for a cell would be deleted from one table-view data-source and added to the other. The animations would be tricky! I'll start working on that right away and post here if something nice happens. Hey... I've uploaded a (partially) working solution at github

PS: It needs a lot of improvement. For now, you'll have to tap the cell to be dragged once, and then, hold and drag it to the required area.


I have a basic implementation (with crap animations) here: https://bitbucket.org/elmalabarista/dragdroptableviews

0

精彩评论

暂无评论...
验证码 换一张
取 消