1

I have a tableview, 3 items in a cell, basically I am showing my items in grid view format with 3 columns and I am using tableview for this. This is fine. Now I want to achieve something like when I press any item on tableview/cell for long then all items will wobble and there will be small delete icon on their top left, when user press that icon then that item will be deleted, the way it happens in iPhone home screen.

Now first I want to know is how much feasible is this idea ? Like my only 2 rows will be visible at a time, and tableview reuses cell so if I scroll down and I delete any of the item then it won't create much hassle to manage delete of correct item right? And I want some direction of achieving that long press and wobble effect animation of items. What can I try?

halfer
  • 19,824
  • 17
  • 99
  • 186
padam thapa
  • 1,471
  • 2
  • 20
  • 41

1 Answers1

2

For the wobbling effect animation code, check out this post.

And for the tableview management,you have to save the indexpath on the layer property of the view.

[imageView.layer addObject:indexpath forKey:@"indexPath"];

Now you are able to grab the cell and delete it.

halfer
  • 19,824
  • 17
  • 99
  • 186
Shrey
  • 1,959
  • 2
  • 21
  • 44