I just finished my iPhone app and I want to make it Universal. I've read a few posts already but they're a bit old (2010 or so).
What I got:
What I'd like to accomplish:
I like it because it'd make a great introduction-level migration.
I have no idea where to start. When I run the iPad simulator a white screen comes up and that's it.
Well this is done.
As with almost everything, this is pretty easy once you know what to do.
I'd say that for those cases like mine, where the UI doesn't change in more than sizes or (x,y) coordinates the process could be summarized like this:
In order to identify in which device the app is running you can use the following:
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
//I'm running on the iPad
} else {
//I'm running on the iPhone
}
And that's it. Again, in a simple case like mine the reuse of code is absolute (100%), the new code you'll have to add is minimum (basically IF statements where needed), and the UI elements duplication is as easy as copy and paste.
I hope this is useful to someone else and if you have recommendations to improve this they're more than welcomed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With