Reputation: 431
I am using a UICollectionView library called VegaScroll. The library is located at https://github.com/ApplikeySolutions/VegaScroll. My question is how can I add a swipe left feature to this, so when the user swipes left, the collection cell shows the trash image and gets deleted? I know its very simple in a table, but I am using this library which is a collection view. I have searched on all the questions on this forum, but they haven't solved this problem. Something like below. I'm also using an XIB for my cell.
Upvotes: 4
Views: 8140
Reputation: 664
It is a tableView existed functionality. For collectionView you should write it on your own. There is no existed pre-built solution.
You can use the pod like this (which can what do you need)
https://github.com/SwipeCellKit/SwipeCellKit
Or custom written simple logic like here:
Update: There is actually a way to do this (now) with a built-in API:
How do you support swiping to delete a row in a UICollectionView list with compositional layout?
Upvotes: 4