PDA

View Full Version : XIB And Storyboards




nashyo
Aug 22, 2012, 03:08 AM
Can you start off with a rootViewController that isn't within a storyboard, and then later use a storyboard?

rootViewController = [[UIViewController alloc] initwithNibname;blah blah

then instatiateView controller from storyboard

then call perform segue with identifier etc

?



Duncan C
Aug 22, 2012, 07:42 AM
Can you start off with a rootViewController that isn't within a storyboard, and then later use a storyboard?

rootViewController = [[UIViewController alloc] initwithNibname;blah blah

then instatiateView controller from storyboard

then call perform segue with identifier etc

?

It's my understanding that you can mix XIB and Storyboard based content. However, you may have problems if you try to use segues to transitions to/from view controllers that don't come from a Storyboard. I believe that segues expect both view controllers to come from the storyboard.

Storyboards use string identifiers to specify view controllers and segues. XIB based objects don't use an identifier, so any storyboard-based mechanism that uses an identifier won't work with a non-storyboard sourced object.

You're probably going to have to experiment yourself to figure out what works and what doesn't.