Event handling in UITableViewCell's subviews
I开发者_JS百科 need to create a tableView with customized UITableViewCell that has three small buttons in their view. Is there any way by which I can trap the click events of Buttons as well as didSelectRow of TableView and decide what to do?
Any subviews of a table view cell will receive events just as if they were placed outside of the table. Just create the UIButton
objects you need, add them to the table cell's contentView
, and then make sure to set up any actions you want to know about.
精彩评论