• 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: Auto Layout and Resizable NSViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Auto Layout and Resizable NSViews
      • From: Thomas Wetmore <email@hidden>
References: 
 >Auto Layout and Resizable NSViews (From: Thomas Wetmore <email@hidden>)
 >Re: Auto Layout and Resizable NSViews (From: Quincey Morris <email@hidden>)
 >Re: Auto Layout and Resizable NSViews (From: Thomas Wetmore <email@hidden>)

  • Prev by Date: Re: Auto Layout and Resizable NSViews
  • Next by Date: Re: Auto Layout and Resizable NSViews
  • Previous by thread: Re: Auto Layout and Resizable NSViews
  • Next by thread: Re: Auto Layout and Resizable NSViews
  • Index(es):
    • Date
    • Thread