开发者

Click Thumbnail to Expand Image in UITableView

开发者 https://www.devze.com 2023-01-22 01:12 出处:网络
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 expa

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消