0

I'm using a view in a background window that I would like to click and immediately activate a mouseDown event, I currently have to click once for the view's window to activate and click again to run mouseDown. I remember having seen something like this but I haven't used XCode in almost a year and I can't find it anywhere.

Thanks for the help.

Elbimio
  • 1,041
  • 2
  • 10
  • 25

1 Answers1

0

Found it!

In case anyone runs into this problem all you need to do is override acceptsFirstMouse:

In your view class just add the method:

- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent {
return YES;
}

Super simple stuff.

Elbimio
  • 1,041
  • 2
  • 10
  • 25