Relaying Actions from UITableViewCells
Sometimes, it is useful to add a UIControl or one of its subclasses, like a UIButton, to a UITableViewCell. For instance, we want users to be able to tap the thumbnail image in a cell and see a full-size image for that item. In this section, we’ll do that by adding a clear button on top of the thumbnail. Tapping this button will show the full-size image in a UIPopoverController when the application is running on an iPad.
Open HomepwnerItemCell.xib and drag a UIButton on top of the UIImageView that is already there. Resize this button to match the exact width and height of the UIImageView.
Then, Option-click on HomepwnerItemCell.h to open it in the assistant editor. Control-drag from the button to the method ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access