is it possible to design view for iPad without autolayout? - ios

I have developed app without autolayout for iPhone. Now I need that app for iPad also. Is it possible to create it without autolayout?

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 .

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.

Related

porting iPad app to iPhone using one storyboard with one storyboard

i am able to make my iPad app running on iPhone but the iPhone screens doesnt fit all the content in. For example my table view main text is hidden, the buttons are very much spaced from the border. I understand the spacing given in my storyboard files in too big for iPhone screen.
I want to make my app work for iPhone with very minimal changes. I dont want to create a new storyboard and rewrite everything. Please suggest a good way.
Thanks in advance.
You need to make the app Universal, make a single storyboard the main storyboard in both target's project settings and use Autolayout to position your UI elements respective of the device. Look into Size classes to keep your design responsive.

Swift nonUniversal storyboard (Without Auto-Layout)

Hey there i want to make my app look different on other iPhones so i want to make storyboards for every iDevices is it possible ??
(Without Auto-Layout) Thanks
Yes it is possible to create storyboards for every device that you want. However it is very tedious as compared to having 1 universal storyboard or two storyboards if you want different designs for iPad and iPhone.
Alternatively, you could also use code to detect whether it is an iPad or iPhone, check out this link. As for different sizes for the iPhone, you can do a manual check of the size of the scene and adjust accord.

Do I still need two Storyboard files to manage different devices now with Universal Storyboards?

I have an iPad only app that I'm switching to support iPhone as well. Not going well so far, the project was created before universal storyboards. When I run it on the iPhone, it sticks with the good ol' iPad size. Should I delete my storyboard and add a Universal one, or create separate Xib's / Storyboard's to support iPhone's?
I don't think you need to create separate xib or storyboard to support iPhone.
You can enable auto layout and size classes in your storyboard. Auto layout helps you layout your views based on constraints while size classes helps you check whether the view is running in iPad or iPhone, as well as the device orientation.
You can then layout your screens based on different size classes.
Please check WWDC video Building Adaptive Apps with UIKit for more information.
You can use a second storyboard but in my opinion it is easier to generate all the objects in code. Then you can use values like this: self.view.frame.size.width/2 to center it on the x-axis on every device. And you don't need a storyboard for every screen size.

xCode layouts not scaling correctly

I am trying to create a universal app capable for all devices, but it is not scaling correctly. Below (the correct version) is a screenshot of my iPhone 5s, and the one that is out of scale is a screenshot of my iPad 2.
Am I doing it correctly making it scale? Or should I use 2 storyboards and assign one to iPhone, and one to iPad?
Its good to make two different xib. But for small screen you have to apply proper auto sizing then it will not be a problem. You can use this for example
For Section 1:
For Section 2:
For Section 3:
and
For Section 4&5:
The better way of doing this is making two separate storyboards. One for iPhone and other for iPad. This offers you the flexibility to play with both in your own ways and there are many cool things that you can work out with iPads. And to do that, you need separate storyboards in your app. It eliminates the dependency between the look and feel of both the devices.
For making two storyboards the easy way, see this :
How/whether to make a universal storyboard in Xcode
For the selection of appropriate storyboards based on devices, check this :
Selecting different storyboards based on device type
This might help you immensely.

ios - how do I make an app which I developed on the iPhone storyboard also work on the iPad?

I have an app that is nearing completion. So far I have just been using the iPhone storyboard to map out the navigation, but I would also like the app to work on the iPad. Is there a way to just "make it work" or do I have to re-do by hand the entire app flow on the iPad's storyboard?
Thanks!
Considering they have different resolutions, and aspect ratios, you really just have to grin and bear it, and convert it all manually. You can at least copy the storyboard file to a new one, and adjust the views one by one to be ipad-sized
If you made it a universal app, I'd suggest creating another storyboard targeted for iPad and work from scratch. You can still use all the controllers and methods therein for your new views (considering there's nothing very specific) with some slight modifications to adjust for the iPad.

Resources