I have a custom UITableViewCell, called EventCell
.
EventCell.h
#import
@interface EventCell : UITabl
You shouldn't have to implement didSelectRow
for this to work - control-dragging from a cell to another view controller should create a segue that works when tapping the cell.
In my case, the problem was that the storyboard editor was creating the segue incorrectly. I had two very similar storyboards, one worked and the other didn't, and looking at the source code (right click on the storyboard file and choose Open As -> Source Code), I saw this:
Note the trigger
attribute. This suggests to me that the segue will be fired from the accessory action of the cell. You can even see this from the connections inspector of the cell:
Removing this and replacing the segue by dragging from the "selection" handle above instead of control-dragging from the cell gave me the correct segue.
I'm not sure what it is about this particular cell that makes control-dragging connect to the accessory action instead of the selection action, but there you go.