Re: Segue
Alex Zavatone
Please pardon this little sidetrack from this storyboard discussion. Why? Well, the UIViewController header comments of course. If you invoke this method with a nil nib name, then this class' -loadView method will attempt to load a NIB whose name is the same as your view controller's class. This means that the storyboard can exist as a visual representation of your app and its screen flow and you can use XIBs for each screen and they will automatically take the place of your scene’s top level view if you simply delete the top level view of your scene. It is (was) that simple. In fact, IIRC, this has been that way since at least 2008. This means that on larger teams, there are no storyboard merge conflicts at all if each developer keeps to their own XIB. Just set the top level class of the scene to the class in the storyboard and do the same in the XIB. Everything just loads and works. Let multiple developers work in multiple XIBs. Now, this changed somewhat in Swift and the Swift implementation looks very close to Objective-C, so it shouldn’t be too hard to see if a similar approach works in Swift. It’s much much easier just using the storyboards as skeletons and keeping all the top level views in individual XIBs. Segues work as they are expected to, everything else works just as it is expected to. It’s nice. Hope this helps someone else. Cheers, Alex
|
|