Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharing scene between multiple storyboard files. iPhone vs iPad

Tags:

ios

storyboard

I'm working on a Universal app using storyboarding. I have 2 storyboard files. One for iPhone and one for iPad. I will have a handful of scenes that I would like to share between both and I want to use the storyboard editor to set them up. A common one is a UITableViewController and its prototype cells. I can make it in 1 of the storyboard files but how do I show it in both files without redoing its design?

like image 535
jamone Avatar asked Jan 02 '12 20:01

jamone


1 Answers

I don't think that's currently possible, though it would be cool. You could have a third storyboard that was for common views but segues to those views would have to be done programmatically.

Once you create an instance of that third storyboard, you can do [storyboard instantiateViewControllerWithIdentifier:STRING_ID] to get an instance of it.

This is what I did in one of my apps where I had some common tools that were shared.

like image 87
Philippe Sabourin Avatar answered Nov 23 '22 01:11

Philippe Sabourin