I have taken UIbutton
on TableViewCell
, but when I click on a row, only the row get clicked, but I want to click only the button on that row.
How is this possible?
I have taken UIbutton
on TableViewCell
, but when I click on a row, only the row get clicked, but I want to click only the button on that row.
How is this possible?
In the CellForRowatindexPath define tag for button and also set target to handler the event
First do one thing
Then create
IBOutlet
of your button in Cell class (Don't create theIBAction
yet!!!)Then in your
CellForRowatindexPath
create the action of button like thisthen create the button action Function
Check it. Hope it helps!!!!
you set click event for cell Button try this way