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.
문제
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.
해결책
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.