In this post, I first state my problem then I state how I figured out to solve it. I want to know if this is the best or “correct” way to have solved it or if there is a more round about way that I overlooked. Thanks!
1.) I have a segue constructed that takes a UIButton touchUpInside and creates a subclass of UITableViewController with custom cells etc….. Also I like how it uses “Form Sheet” presentation on the iPad version. That looks great. I have all the code written to dismiss the table view as well.
It turns out it would be a whole lot better to bring this tableview up from a double tap on one of my UIView and get rid of the UIButton that currently triggers the segue.
Problem though, I don’t see any way to do that with the storyboard IDE. I like the segues and don’t want to mix nib loading into this app.
2.) My solution was to delete the UIButton (which also unfortunately deletes the segue). No problem, just re-create it but with the UIButton’s parent viewcontroller as the source. Highlight the segue and give it an identifier. This is how we’ll trigger the segue programmatically.
Now in the double-tap detection I call:
[self performSegueWithIdentifier:@”segue_MyTableViewController” sender:self];
What you’ve done is correct. There are only certain “automatic” segue points available in the storyboard editor (buttons, table cells are two that immediately spring to mind). Above and beyond that, you define the segue directly from the view controller and call it programmatically, as you’ve done.