0

I have a UITableView and I would like that when they enter a certain area of the device, the cells' content view would appear to be reduced.

Only the part of the cell in this area would be scaled down. How can I achieve that?

I guess it has to use a UIView as an overlay view and apply a transform somehow to the underlying view that crosses it but I have no idea how to do it.

Nico
  • 6,269
  • 9
  • 45
  • 85

1 Answers1

2

You can take a snapshot of the cell in question (before you leave the table view) by calling snapshotViewAfterScreenUpdates: with argument false on the cell. Now, as you say, you do whatever you want with the resulting snapshot view, including transforming it to be smaller.

Moreover, you can place the snapshot view into the interface and animate the change in its transform as part of the transition to the next view controller. That's what Apple is doing, for instance, in the Calendar app, when a year zooms into a month.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • For examples from my own apps, see my answer here: http://stackoverflow.com/a/33179604/341994 – matt Nov 13 '15 at 02:57