Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thedon1

macrumors 6502a
Original poster
Jun 26, 2010
529
73
Hi

I am developing an iPhone app and would like to make it universal. Is there a step by step guide on what I should be doing to achieve this?

I'm using storyboards and most guides out there are quite old and use xibs.

Thanks
 
It is pretty simple as most of your "code" is there. First you should add a new file to the project. This should be a Storyboard file. I would name it "iPadStoryboard" or something. In your project settings, change the app to universal which will reveal a new section where you can specify iPad specific icons, and specify which storyboard the iPad version uses. Choose the iPadStoryboard file you created and then use that storyboard to layout your iPad version and make all the connections you would make just like the iPhone version.
 
What about for apps that do not use storyboarding?

Is it possible to storyboard the ipad side and not the iphone side?
 
What about for apps that do not use storyboarding?

Is it possible to storyboard the ipad side and not the iphone side?

Not sure. I never use StoryBoarding, call me old fashioned but it's just too easy for me, can't beat a good old fashioned .xib although I'm sure I'll get bashed with many a reason as to why I should change my mind.

Anyway I find the easiest way to do it (it of course depends on the kind of app you're building) is just get the view controllers to load a different .xib dependent on the device type (there are many ways you can do this). Then you can just duplicate your existing .xib, change the dimensions to iPad size and change the files owner to whatever you want, as long as the if statement controlling the loading of either an iPhone or iPad .xib knows to load it.

It's a dirty hack but I've used it for a long time and find it works well and I can keep control of my project a lot easier. (a lot of my older apps use many hand dropped interface builder elements and no dynamic layouts).
 
It's a dirty hack but I've used it for a long time and find it works well and I can keep control of my project a lot easier. (a lot of my older apps use many hand dropped interface builder elements and no dynamic layouts).

So, no auto-layout either?
 
Not sure. I never use StoryBoarding, call me old fashioned but it's just too easy for me, can't beat a good old fashioned .xib although I'm sure I'll get bashed with many a reason as to why I should change my mind.

Anyway I find the easiest way to do it (it of course depends on the kind of app you're building) is just get the view controllers to load a different .xib dependent on the device type (there are many ways you can do this). Then you can just duplicate your existing .xib, change the dimensions to iPad size and change the files owner to whatever you want, as long as the if statement controlling the loading of either an iPhone or iPad .xib knows to load it.

It's a dirty hack but I've used it for a long time and find it works well and I can keep control of my project a lot easier. (a lot of my older apps use many hand dropped interface builder elements and no dynamic layouts).

I dont plan on using storyboard ever either haha. Anyways thanks for the idea I will give it a try with one of my more simple apps.

----------

So, no auto-layout either?

I think there is an issue with auto-layout and support before ios5. I dont use auto layout on my stuff either.
 
4.3 and up on my stat tracking app. I compete with ESPN on a few of my stat trackers so I need all the reach I can get haha. I honestly could drop it without much of a loss but I find it easy to manually move elements around when accounting for a 3.5inch screen.
 
That all depends on the App, I will use it when it behaves nicely.

I have the same feeling. Sometimes it works very nicely but other times it can be just so frustrating. I watch the WWDC videos and they make it look so easy. Then I try to reproduce, say, a table-cell label-value layout that scales nicely and get nothing but warnings.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.