Matt
Matt

Reputation: 4989

Click Thumbnail to Expand Image in UITableView

So I have a UITableView that has a list of image names and corresponding thumbnails, and I'd like to implement some sort of click to expand thumbnails, so when a user clicks on the thumbnail, it expands to fill the whole screen. Is there an easy way to do this? It needs to only expand for the image part of the cell, not the text part (this already has different behavior when clicked).

Thanks in advance.

Upvotes: 2

Views: 618

Answers (1)

Luke
Luke

Reputation: 3655

How are you displaying the thumbnails on the cell? One possible way is to add the thumbnail as a subview of the cell and bring the subview to the front.

Then override the touch events for that subview (thumbnail) so that upon touch, the image expands to fill the screen. I'm not sure whether the the touches will flow down to the cell, causing the cell's touch events to be fired either.

Upvotes: 1

Related Questions