I'm getting the above error from storyboard when I dropped a UITapGestureRecognizer inside a UIView which is inside a UITableViewCell in my scene.
Any idea why I'm getting this error ?
I'm not sure why the restriction is in place but I know why you are getting it the error.
When you design a UITableViewCell
in StoryBoard you are only designing a prototype object. i.e. the object may never actually exist. It only gets ACTUALLY created in tableView:cellForRowAtIndexPath:
What might be a better approach is to create the gestureRecognizer when you configure the cell in code. This way you won't have this restriction.
I'd also possibly look at whether you actually need it? If it is just for a single tap with one finger then you may be better off coding the touchesEnded
or just using a UIButton instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With