Re: NSImage mouse events
Re: NSImage mouse events
- Subject: Re: NSImage mouse events
- From: Graham Cox <email@hidden>
- Date: Thu, 11 Aug 2011 09:12:56 +1000
On 11/08/2011, at 7:46 AM, Nial Giacomelli wrote:
> I have a number of NSImages that I'm rendering in a custom NSView subclass.
> I'm looking to enlarge theses images as and when the user places their mouse
> over them and am wondering about the best way to go about doing this.
>
> Currently I'm using the NSView's drawRect: method to composite the images,
> but also free to render them via NSImageView instances, if that will make
> things easier. My initial instinct was to setup NSTrackingArea's for each
> NSImage instance but wanted to ensure I wasn't missing something obvious.
I'd look into CALayer - performing the enlargement is trivial and it will animate the effect for free.
--Graham
_______________________________________________
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