Storyboard XIB linking.
Storyboard XIB linking.
- Subject: Storyboard XIB linking.
- From: Alex Zavatone <email@hidden>
- Date: Thu, 17 Apr 2014 16:50:29 -0400
Not sure if this is the right place to post this, but since I started the thread earlier this week about "is there a way to merge storyboards on a multi developer iOS team" and didn't get a good reply, I hope that some people will enjoy the results of my research and/or will tell me if I am doing anything monumentally stupid in this approach.
Source example is available if anyone wants. Just email me.
Here's the summary.
This approach allows developers to lay out a storyboard in iOS and then use individual XIB files for the content within each scene with no modifications in view controller code whatsoever.
Here's how you do it.
// #### Storyboard Scene XIB Linking Rules
//
// Alex Zavatone 04172014
//
// #### You MUST call the XIB the same name as the view controller. The XIB is then loaded automatically by the VC.
// #### You MUST assign the view controller to the storyboard scene AND as XIB's Custom Class.
// #### You MUST remove the storyboard scene's main view.
// #### You MUST wire the XIB's view to the File's Owner view.
// #### You then treat all actions in the view controller as if nothing is different. No calling the parent view at all.
// #### The XIB's view takes the place of the storyboard scene's view.
//
// #### If you do all of the above, you now can link XIBs within storyboard scenes with no special code at all.
// #### Segues issued from a button in the XIB will work.
// #### Button actions to items within the XIB from the view controller will work.
// #### All view controller code (that I can know of) acts like nothing has changed at all.
//
// #### Summary: the view of the XIB replaces the deleted view of the storyboard scene allowing linking to XIBs from storyboard scenes.
// #### You lay out your skeleton as a set of storyboard scenes and each scene has its own XIB allowing multiple developers to work
// #### on UI at the same time through the individual XIBs.
//
Tested on OS X 10.8.5 in Xcode 5.1 against 64bit iOS 7.1.
Please let me know if this approach is monumentally stupid, or if it actually solves the problem.
Cheers,
- Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden