boom
boom

Reputation: 6166

mouse over on image object which was drawn on view

I have drawn an object on NSView subclass. How can the object know that mouse over is done

on it when mouse passes over it.

Upvotes: 0

Views: 204

Answers (1)

Costique
Costique

Reputation: 23722

If the object is neither NSView nor CALayer (that is, you draw it in your view's drawRect:), the recommended way is to use NSTrackingArea class. You will get the notifications you need sent to the NSView.

Upvotes: 1

Related Questions