Re: Xcode 7.3.1: Auto Layout drives me crazy
Re: Xcode 7.3.1: Auto Layout drives me crazy
- Subject: Re: Xcode 7.3.1: Auto Layout drives me crazy
- From: Ulf Dunkel <email@hidden>
- Date: Mon, 23 May 2016 13:40:23 +0200
- Organization: invers Software & DSd.net
Hi Quincey.
Am 20.05.2016 um 19:04 schrieb Quincey Morris:
On May 20, 2016, at 03:56 , Ulf Dunkel <email@hidden>
wrote:
In English, everything looks fine,
and most other languages are auto-layouted fine, too. But
when you compare it e.g. with Spanish, you'll see that
some things aren't properly auto-layouted on runtime,
although they are in the Assistant Editor.
It looks like the window sizing is taking precedence over
some of the horizontal spacing.
Yes, but I cannot tell this "window" (which in fact is just an
NSView) anything else but the Content Hugging and Content
Compression Resistance priorities. What ever I tried, the run-time
sheet doesn't behave like the Assistent Editor's preview does.
I really wonder if the issue is
founded in the "Translates Mask Into Constraints" checkbox
which is set for the main NSView:
-[NSView
setTranslatesAutoresizingMaskIntoConstraints:].
Huh? Why are you setting this, ever, if you’re using
autolayout? (Other than in an attempt to control a layout going
haywire, to which problem this is not the correct solution, on
the face of it.)
I didn't set this, but Xcode did when I switched the XIB to Auto
Layout. When I switch it off and build the app, the first time the
sheet is shown it is shown wrongly, but the second time its spacings
have been computed correctly.
I must admit, I had trouble with autolayout using
NSBox, in part because it now seems to have an intermediate view
between the box and the contents. I ended up going with a
“flatter” design that didn’t use the boxes.
As long as the Assistant Editor shows a correct behavior but the
run-time version does not, I will not give up. ;-)
---Ulf Dunkel
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden