objective c - NSClickGestureRecognizer not working as supposed (requires one click more) -


i'm using nsclickgesturerecognizer os x app. not work supposed. when set required number of clicks 1 fires after 2 clicks. when set 2 fires after 3...

i use this:

nsclickgesturerecognizer *click = [[nsclickgesturerecognizer alloc] init]; click.target = self; click.delegate = self; click.numberofclicksrequired = 1; click.action = @selector(fireworksclicked:);  [self.fireworksview addgesturerecognizer:click]; 

the code above fires after double click. have ideas why?

maybe can try overwrite

- (bool)acceptsfirstmouse:(nsevent *)theevent; 

in fireworksview return yes.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -