Re: Still can't get autolayout to work the way I want
Re: Still can't get autolayout to work the way I want
- Subject: Re: Still can't get autolayout to work the way I want
- From: Kevin Cathey <email@hidden>
- Date: Thu, 19 Sep 2013 17:40:10 -0700
To get the new Xcode 5.0 auto layout workflows, check to make sure that you don't have your development target for the nib set to 4.6.
You can check this by selecting the document, opening the file inspector, and under "Interface Builder Document" make sure "Opens In" is set to "Default (5.0)" or "Xcode 5.0".
Xcode 5.0 provides new workflows but also maintains compatibility with the 4.6 workflow if you want it. When you open a 4.6 document we will prompt you to upgrade to the 5.0 format. If you clicked "Skip" when opening one of these documents they you still have the Xcode 4.6 behavior (which does automatic constraint insertions and deletions).
Kevin
On 19 Sep 2013, at 17:29, Kyle Sluder <email@hidden> wrote:
> On Sep 19, 2013, at 4:23 PM, Brad O'Hearne <email@hidden> wrote:
>>
>> Anyway, you get the point. I have found myself actually devoting time to trying to reverse-think how some of these auto-generated constraints appear, because some of them are so wacky I find myself wondering that it must be something ridiculously simple I'm missing.
>
> All of this is so vastly improved in Xcode 5 that I honestly can't compare them.
>
> Xcode 5 doesn't insert any constraints for you at design time. You are free to drop anything you want wherever you want on the canvas, and no blue tentacles will emerge from your views.
>
> When Xcode compiles your nib, any views without constraints attached to them will get fixed top, left, width, and constraints that reflect their position in the canvas. This means you can test our your interfaces while getting reasonable, if not ultimately desired, autoresizing behavior.
>
> Once you add a constraint to a view, IB now starts providing hints as to what other constraints you need to add to correctly define that view's size and position. But it never forces those constraints on you. Even if you install a consistent and unambiguous set of constraints on a view, you can then drag that view willy-nilly around its container. IB will warn you that what you get at runtime will look wildly different from where the views are right now, and it will let you quickly snap the views back to their runtime frames (which are represented by a dotted outline).
>
> IB also has support for marking individual constraints as "placeholders", meaning they are removed at compile time. This lets you design your interface with constraints that mimic ones which will get installed at runtime. You can also provide a placeholder intrinsic content size, which is very useful for placing custom controls.
>
> --Kyle Sluder
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden