XIB And Storyboards

Discussion in 'iOS Programming' started by nashyo, Aug 22, 2012.

  1. macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #1
    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

    ?
     
  2. macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #2
    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.
     

Share This Page