Re: Auto Layout and Resizable NSViews
Re: Auto Layout and Resizable NSViews
- Subject: Re: Auto Layout and Resizable NSViews
- From: Quincey Morris <email@hidden>
- Date: Mon, 20 Jul 2015 23:53:53 +0000
On Jul 20, 2015, at 16:41 , Thomas Wetmore <email@hidden> wrote:
>
> Here is the mouse-down method with event loop. As you can see I am calling setFrameOrigin in the dragging case and setting frame directly in the resizing case.
So I think you need to retool your thinking. With auto layout, you no longer change the size or position of views, but rather change the constraints that are applied to those view, as Ken Thomases explained in his post.
As a side issue, given that you’ll need to update constraints and re-layout your view hierarchy every time the mouse moves during a drag, it might be worthwhile retooling your code to use mouseDown/mouseDragged events non-modally, instead of using your current modal loop.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden