> Excerpt from Xcode 11 release notes originally quoted by Quincey Morris.
> 
> NSView and UIView have a layout mode option in the Size inspector to 
> explicitly opt into “translates autoresizing mask into constraints”. The 
> default setting is “Automatic”, which is the existing behavior. “Automatic” 
> implies that “translate autoresizing mask into constraints” is off when a 
> view affect by constraints in the storyboard or .xib file, but on if 
> unconstrained. (37352354)

Is it just me? I found this very confusing.

> On Sep 26, 2019, at 8:44 AM, Laurent Daudelin via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> I just checked this Quincy. What I observe is that the top view in my windows 
> have the setting set to “Translates autoresizing mask into constraints” but 
> all the other subviews are set on “Automatic”. Should I leave it that way? 
> This is an old project predating the auto-layout, by the way.

I also noticed the same thing. The content view of the window has a different 
behavior and default compared to the subviews.

Previously Auto Layout was enabled or disabled per nib. Now the layout mode is 
per view and constraints can not be fully disabled. So the existing behavior is 
not present in Xcode 11.

IB Auto Layout or constraints was introduced around the Xcode 4.2 timeframe. An 
IB document could enable or disable Auto Layout with a check box in the file 
inspector. Looking through the historical Xcode release notes you can see it 
took a long time to get it working properly. This may be why some developers 
opted out of Auto Layout.

I have a large project with with Auto Layout turned off in each nib. I opened 
the project in Xcode 11 and started working my way through the nib warnings and 
then realized I don’t know what I am doing so I stopped.

--Richard Charles

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to