Re: Views without any layout constraints may clip their content or overlap other views
Re: Views without any layout constraints may clip their content or overlap other views
- Subject: Re: Views without any layout constraints may clip their content or overlap other views
- From: Richard Charles via Cocoa-dev <email@hidden>
- Date: Thu, 26 Sep 2019 11:04:48 -0600
> 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
> <email@hidden> 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 (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