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
Post a Comment