سؤال

OK, so basically this is what I want :

  • I have an NSView (embedded in an NSSplitView but that shouldn't matter
  • When mouse reach its leftmost edge (or a few pixels more - perferable as a percentage of the overall window width: like when mouse is within the leftmost 15% of the screen), an event should be fired
  • And then I'm going to expand the leftmost view of the split view

How should I go about this?

هل كانت مفيدة؟

المحلول

Check out the NSTrackingArea reference. You can add tracking areas to your view that will respond to mouseEntered: events.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top