I’m creating an iPhone app using storyboard. I have a table view and 4 sections. Now I try to forbid the navigation in section 3 and 4 to the detail because the values in this section are calculated values which comes from the values in section 1 and 2.
What can I do? I tried to use didSelectRowAtIndexPath: to do this but unfortunately the detail view is called in each case. Thanks a lot for each hint to everyone.
If you change the source of your segue to be the view controller that contains the table instead of the table view cell, then you can use
didSelectRowAtIndexPath:as a place to decide whether or not to advance to the detail controller. In the sections where you do want a detail, you would use a call toperformSegueWithIdentifier:to trigger it.