iOS - Add an action to a custom UIViewCell
I am building a simple app with a table view filled with custom view cells
and using a storyboard. I want to add a actions on the cell each time the
user tap it.
So far, I tried to create an IBOutlet to link my cell to my
tableViewController and add the action manually in the code but each time
I try to do it I get an error message saying "Illegal Configuration -
cannot have a prototype object as its destionation".
The only quick fix I found is to add a UIButton with a transparent
background and no title which fills in the whole cell and attached the
action to it.
Is there any more elegant way to do it?
Many thanks
No comments:
Post a Comment