> On 27 Nov 2015, at 15:08, Roland King <r...@rols.org> wrote: > > well don’t use the pin-thingy then, do what I said in the mail I sent you > earlier. Control drag between the label and the box in the outline list at > the left of the screen.
I always thought that this pin-thingy was the only way to add constraints. But, as you said, control dragging works perfectly. Thanks a lot for educating me! I would never discovered this by myself. Kind regards Gerriet. > There are two possibly choices for the label, if one doesn’t work, use the > other. The box on my screen was handily labelled ‘box’. You get a popup list > of constraints, you pick the ones you want, you have now constrained the > label to the box. > >> On 27 Nov 2015, at 14:43, Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote: >> >> >>> On 27 Nov 2015, at 11:08, Roland King <r...@rols.org> wrote: >>> >>> Just tried it - worked fine as I would have expected. >>> >>> Didn’t give the labels a fixed height, just constrained the top one to the >>> top of the box, the bottom one to the bottom of the box and them to each >>> other, all in the vertical direction. Had to pin the top corner of the box >>> somewhere and give it a width constraint so it knew where to put it, but it >>> resizes as you change the font on the labels. >> >> As you said: all works fine if the Labels in the box have a constraint to >> the Box, not the View inside the box. >> >> But when I select the “Label in a Box”, and click on this Pin-thingy at the >> bottom in Xcode 7.1, it offers just connections to “View” (which makes a >> connection to the superview, which seems to be the view inside the box) >> which just does not work. >> >> Can’t figure out how to make a constraint to the Box instead. >> >> Do I need a newer Xcode? Or what am I missing? >> >> >>> >>>> On 27 Nov 2015, at 11:44, Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote: >>>> >>>> Xcode 7.1, OS X 10.10.5 >>>> >>>> A xib with an NSBox which contains two Labels and the following vertical >>>> constraints: >>>> >>>> ^ >>>> | Default between Label1.Top and Superview.Top >>>> v >>>> Label1 height = 17 >>>> ^ >>>> | Default between Label1.Bottom and Label2.Top >>>> v >>>> Label2 height = 14 >>>> ^ >>>> | Default between Label2.Bottom and Superview.Bottom >>>> v >>>> >>>> The box has no height constraint - it is expected to fit it’s height to >>>> it’s content. >>>> >>>> But Xcode tells me that both Label1 and Label2 “Need constraints for: Y >>>> position or height” >>>> >>>> How can I persuade Xcode to work as expected? >>>> >>>> Gerriet. >> > _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com