Alex Rivera | Logout

Setting an identifier for an Xcode Storyboard Segue in a UITabBarController, and getting a pointer to its view controller

Asked 2012-07-02T01:07:51.087
9

This is my first app using storyboards/segues, and I'm pretty sure the answer to this is easy, but I'll be as thorough as possible in describing my issue.

I am making a simple app which has a Tab Bar Controller scene and two View Controllers.

View of my Storyboard, with one of the "Relationships" highlighted

My app launches by being sent a URL from another app. The application:openURL:sourceApplication:annotation: method in the app delegate performs some work to determine

  • which tab to display first, and
  • what information to display on it.

My goal is to use the performSegueWithIdentifier method (I'm open to alternatives though) from within the AppDelegate to select the tab, and also find a way to send a method to the instance of the view controller created by the storyboard.

Issue #1 is that I can't set an identifier. When I select the tab "relationship" there are no choices available in the Attributes Inspector (it says "Not Applicable"). How do I set a name for this segue? Can I? Or is there some rule under which UITabBarController segues can't be trigger programmatically?

Issue #2 is that I can't find a way to have a pointer to the view controller. Pre-Storyboard I would alloc and init a new view controller and then set it up, but here if I do that, it does not get displayed when my app launches (I think this is because Storyboard is displaying a different instance of the same view controller.)

I know this post is long, but I feel like I'm missing something simple. What is it?

Edit
Report

1 Answer

0

Sounds like you need to have your AppDelegate set the entry point to your storybard.

answered 2012-07-02T01:35:52.867

Your Answer