• 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: Roland King <email@hidden>
  • Date: Tue, 21 Jul 2015 08:38:59 +0800

> On 21 Jul 2015, at 08:23, Thomas Wetmore <email@hidden> wrote:
>>
>> 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.
>
> I am worried about the performance implications of this. Should I not be? Implementation will tell, of course.

Test it and see.

One point, don’t know if it was already covered as I’ve lost a bit of the thread. Constraints have constants which are amusing named as they’re the one thing you can change. Removing and replacing constraints is expensive and requires lots of recomputation, however just changing the constants on constraints is relatively cheap. So if you do try to do this by setting up and modifying constraints during the drag, see if you can manage to keep the constraint instances the same and just change the constants on them.



_______________________________________________

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


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>)
 >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: Adding UIBarButtonItem to UINavigationBar in Storyboard Xcode 7b2
  • Previous by thread: Re: Auto Layout and Resizable NSViews
  • Next by thread: Re: Auto Layout and Resizable NSViews
  • Index(es):
    • Date
    • Thread