Want to shoot IBAction when tapped inside a static TableViewCells

I have a Static TableViewCells on a storyboard. These cells only have shortcuts. I would like to trigger an IBAction event by touch. Now I am creating a full-sized white button and is bound to IBAction. But it does not display the highlighted color when the cell is selected, because the cell is located behind the button.

+3
source share
2 answers

UITableViewCells has a delegate method specifically for handling row strokes - tableView: didSelectRowAtIndexPath:

, UITableViewCell , . , , nitty gritty iOS-.

+3

cellForRowAtIndexPath ( ):

cell.selectionStyle = UITableViewCellSelectionStyleBlue;

?

-1

All Articles