On Aug 7, 2015, at 4:48 PM, SevenBits <sevenbitst...@gmail.com> wrote: > > I’m experience a slight bug? in my app relating to auto layout constraints. I > have a preference pane which should be expanding to fill the length of one > center-aligned element. This does not happen. What happens is the xib is > designed for English (my Base language), and in German, one particular text > checkbox is expanding outside of the bounds of the container, making it > impossible for the user to read the entire label or click the checkbox. > > I have these constraints assigned to the element: > > - Align Center X to Superview > - Top Space to Superview Equals Default > - Bottom Space to (a button) Equals 14 > > Xcode’s preview window shows the current behavior, so I assume this can be > expected. What I want is the element to be center aligned if its width is > less than that of the parent view, but if it is larger, then I want the > parent view to expand so that the entire checkbox and its label can fit > within the parent view. > > I tried setting a constraint to set the Trailing Space to the Superview, and > this displays properly in the Preview pane, but *not* in the app itself. > > I hope that this is clear. Can anyone provide any pointers?
Assuming I’m reading and understanding what you want to do properly, I’d try this: - Trailing space to Superview >= default - Leading space to Superview >= default - Compression resistance priority set to something high See if that does what you want. 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