-1

I have a table that displays different images (usually between 1 and 4 per cell). The images are programmatically added and aligned via auto layout.

I'm trying to implement the force touch method peek and pop, so that a user can push down on any of the images and the peek and pop will work.

I tried several different things to get the specific image, but none seem to be working. I added a tap gesture recognizer to each of the images in the cell that sends the index of the picture to the tableviewcontroller via a delegate, but the force touch method was called before the tap gesture was. I also tried creating an nsinteger property for the cell that gets set each time any of the cells get the touched. But this also doesn't get called before the force touch method.

How should this be implemented?

pwgoog
  • 11
  • 4

1 Answers1

0

Peek and pop is merely a way of previewing a view controller transition. So think about how you would implement a transition where you tap on the cell and present the image in a presented view controller. Now configure that transition in the storyboard. Now check the Peek & Pop checkbox!

matt
  • 515,959
  • 87
  • 875
  • 1,141