IB adds constraints to both the NSImageView and its superview. I believe
that this is why deleting a constraint causes it to come back (it's in two
views).

Here's what I recommend:
- Delete the NSImageView which will also delete the associated constraints.
- Drag a new NSImageView to the window (i.e. the main view of the window).
- Resize the NSImageView to fit inside the frame of its containing view.
- Select NSImageView, by double clicking on the NSImageView in the list of
objects. Now, from the Editor menu select "Align -> Horizontal Center in
Container" and "Align -> Vertical Center in Container." (You can also do
that by clicking on the leftmost icon of the constraints control at the
bottom right of the IB view.)

That should do it. Adding those alignment constraints deleted the trailing
and bottom constraints.

Chuck


On 4/25/13 4:39 PM, "Rick Mann" <rm...@latencyzero.com> wrote:

>I put an NSImageView into a window. I want the NSImageView's frame to
>always fill the window content frame.
>
>When I dropped it in, IB gave it a width and height constraint that I
>can't edit. I sized it to fit the window, and it also added leading and
>trailing space constraints.
>
>I explicitly set top and bottom constraints.
>
>But the width & height constraints can't be edited. If I promote them to
>user constraints, and then try to delete them, they just come back.
>
>Why does IB think they are necessary?
>
>-- 
>Rick
>
>
>
>
>_______________________________________________
>
>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/chucks%40veladg.com
>
>This email sent to chu...@veladg.com


_______________________________________________

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

Reply via email to