Adaptive/Auto Layout

Am I missing something… I see an iPhone template and an iPad template…
I thought the whole idea behind Auto Layout was it “didn’t matter”…
and if that is a mistaken premise… How does one deal with 4s vs 5s vs 6 vs 6+
I would think that either there would be a prototype for all of them, or that there would NOT be an iPad specific one

Also is there any way to layout controls WITHOUT Autolayout?

You certainly could use the same layout for a phone and a tablet, but there will be times when you don’t want to. The basic project template gives you screens for both, but you don’t need to use them.

Not by default. You could create constraints for fixed top & left relative to the parent though.

As greg said fixed position constraints will work
Which is basically what top , left width & height have always been in desktop
However auto layout in the IDE prefers to write relative constraints when you have guides etc

I have been trying to wrap my head around this for the past few weeks, and am having a hard time doing so…
Especially when there may be cases where you want an app to support ALL devices, yet due to limitations the control layouts are going to be totally different (for example I just wrote a Swift app, where on the 4S is spreads controls across 2 views due to lack of space, arranges them one way on the 5s, and another on the 6+ where it actually combines multiple views into one because there is enough room to do so.)

Now my Swift code does NOT use Autolayout (nor does it use Storyboard, or XIB/NIB), all controls are in code, and the view hierarchy is created when the app starts and has identified what device it is running on…

Autolayout (and correct me with examples if I’m wrong) only seems to apply to insuring that a specific layout of controls looks relatively the same across devices… And where (or does) AL account for altering FONT SIZE if a label is X tall on a 4s, and 4 times bigger on the 6+

Autolayout for a single view does indeed focus on making sure that the view looks correct on whatever devices it IS presented on.
It does NOT present different views for different devices - thats something you create different views for.

[quote=149781:@Dave S]I have been trying to wrap my head around this for the past few weeks, and am having a hard time doing so…
Especially when there may be cases where you want an app to support ALL devices, yet due to limitations the control layouts are going to be totally different (for example I just wrote a Swift app, where on the 4S is spreads controls across 2 views due to lack of space, arranges them one way on the 5s, and another on the 6+ where it actually combines multiple views into one because there is enough room to do so.)

Now my Swift code does NOT use Autolayout (nor does it use Storyboard, or XIB/NIB), all controls are in code, and the view hierarchy is created when the app starts and has identified what device it is running on…

Autolayout (and correct me with examples if I’m wrong) only seems to apply to insuring that a specific layout of controls looks relatively the same across devices… And where (or does) AL account for altering FONT SIZE if a label is X tall on a 4s, and 4 times bigger on the 6+[/quote]

I have been working on extending the design beyond the basic autolayout.

For instance, in my first app, I have a portrait screen with two fonts above each other :

Problem is, in landscape, the two fields above each other would be stretched and not good. So I needed to have landscape that way :

Auto Layout is incapable to manage that. So what I did was to use the View Resized event to detect rotation, and in there, turn visible the sie by side canvases, and hide the above each other ones. Since the fonts are rendered in the Paint event of the canvases, I have made the font size relative to the canvases height, which works fairly well with Autolayout. But that can also be managed in Resized.

During beta I explored another way as well, which is interesting if the layout is drastically different. PushTo a new view in Resized. That way the design of the views can be tuned for portrait or landscape in ways that neither Auto-Layout or visibility cannot really address.

Here is a small demo project I used for a feedback report :
Buddha.zip