• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode 7.3.1: Auto Layout drives me crazy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 7.3.1: Auto Layout drives me crazy


  • Subject: Re: Xcode 7.3.1: Auto Layout drives me crazy
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 20 May 2016 10:04:30 -0700
  • Feedback-id: 167118m:167118agrif8a:167118sluwgjTZ1e:SMTPCORP

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.

IIRC, the assistant editor shows the sub-hierarchy starting from the selected view, which means it won’t reflect the effects of autolayout on the window itself. My guess is that you either have an error in the constraints for the contents of the boxes, or you have an ambiguity (or error) in the priorities relative to the priority of horizontal window resizing.

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.)

Is this an app where you can use NSStackView? IIRC, it was introduced in 10.9, and dramatically improved in 10.11. If you can, I’d suggest you try laying this out with nested stack views. (However, the 6 text fields and aligned labels are bit hard to lay out properly with stack views. For those, I’d suggest manual constraints on 2 new custom subviews of the boxes. Everything else looks like it would be easy in stack views.

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. 
 _______________________________________________
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

  • Follow-Ups:
    • Re: Xcode 7.3.1: Auto Layout drives me crazy
      • From: Ulf Dunkel <email@hidden>
References: 
 >Xcode 7.3.1: Auto Layout drives me crazy (From: Ulf Dunkel <email@hidden>)
 >Re: Xcode 7.3.1: Auto Layout drives me crazy (From: Quincey Morris <email@hidden>)
 >Re: Xcode 7.3.1: Auto Layout drives me crazy (From: Ulf Dunkel <email@hidden>)

  • Prev by Date: Re: Opening a Counterpart File in a SEPARATE Window
  • Next by Date: Re: Opening a Counterpart File in a SEPARATE Window
  • Previous by thread: Re: Xcode 7.3.1: Auto Layout drives me crazy
  • Next by thread: Re: Xcode 7.3.1: Auto Layout drives me crazy
  • Index(es):
    • Date
    • Thread