0
votes

I have a NSTrackingArea to determine whether I should show a close "button" in my view. I would like to show a rollover image.

What is better,

  • Actually using a button ( as a subview ) instead of drawing my own thing, then adding another tracking area to the button and then showing the rollover image..
  • Using a second NSTrackingArea to determine when the mouse is on top of the close button so I can show the rollover image.

I personally think the second one is easier, the only thing that I would have to do extra what the button would do for me is implementing a click action.

1

1 Answers

1
votes

Use whichever approach is simplest for you to implement. It is extremely unlikely that either will cause any performance problems (NSTrackingArea is already highly optimized.)