Question

I am closing in on the end of my project, but now I am trying to add universal compatibility so iPad users can use it too. I have chosen universal in my project settings and duplicated the storyboard. The problem is everything is way too messed up. So I figured I would have to do it manually. I made a copy of the iPhone storyboard and named it differently and put it in my application. This is where my question is. Is there a way to make the iPhone size UIViews iPad views? So like converting the iPhone view to an iPad view. After this I could reposition and resize everything. So is there a way? Or will I need to make each view over again in iPad size?

Was it helpful?

Solution

I recommend using Auto Layout if you are not using it yet and your target platform supports it. Auto Layout is a subsystem that automatically rearranges your views when the screen frame changes, according to a set of constraints that you specify, either programmatically or in your storyboard.

Here's the official documentation: https://developer.apple.com/library/mac/documentation/userexperience/conceptual/AutolayoutPG/Articles/Introduction.html

However, there will still be some screens that you should design independently for iPhone and iPad. That's because Apple design guidelines encourages the use of different designs for iPhone and iPad (ie. an iPad app is not simply an enlarged iPhone app). You will probably need to use different controllers to present the model (a UIPopoverController o a UISplitViewController in iPad, for example). I suggest spending some time thinking about how your iPad app will behave. Read the documentation to know about the view controllers that are unique to the iPad.

And finally, here's some guidance from Apple about creating universal apps: https://developer.apple.com/library/ios/DOCUMENTATION/iPhone/conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top