问题
I have developed app without autolayout for iPhone. Now I need that app for iPad also. Is it possible to create it without autolayout?
回答1:
yes, you have to create App directly then select iPad. and using Auto Resize ,you can directly develop app for iPad only.
I have attached few Screen shot, may be helpful to you.
Create new project, using XIB .
回答2:
I don't recommend that (see comment of @Nimit Parekh).
You can use Sized classes
to avoid having 2 separate Storyboards
- one for iPhone
and other for iPad
. There is a good tutorial.
Second option is to have 2 storyboards
. You only need to link all outlets from the 1st storyboard to the second. You have to check not to miss something, otherwise you can get exceptions in iPad
.
The 3rd option is manually (from the code) to manage layout for iPad - but this will create a lot of specific code for iPad only (you have to check what type is your device and split code) - this is not recommended.
Take into account that Autolayout
is more easy to apply on iPad
(from my point of view) because of equal withd / height ratio for iPad - it is the same up to now. Not like in iPhone.
来源:https://stackoverflow.com/questions/32046612/is-it-possible-to-design-view-for-ipad-without-autolayout