Tuesday, 15 September 2015

ios - UIGestureRecognizer and UIControlEventTouchUpInside work at the same time -


I am adding a UITapGestureRecognizer to my application to detect a double tap gesture. <

Code> UITapGestureRecognizer * tapgr = [[UITapGestureRecognizer alloc] initWithTarget: Self-action: @Selector (handsettape gesture :)]; Tapgr.numberOfTaps = 2; Tapgr.delegate = self; [Edejestinurer: tapeier]; [Tappir release];

This is working fine unless I show tooltips in my application. They are set to: [_view.toolTipView addTarget: Self-action: @Selector (Transaction: Control events: UIControlEventTouchUpInside); < P> Before the introduction of my gesture identifier, these tooltips where clickable and responded were expressed, now they are no longer responding ...

How do I get a signal identifier and a standard UIControlEventTouchUpInside - Setup work together?

I found a solution:

  - (BOOL) sign: identifier: (UIGestureRecognizer *) Receptor to gesture identifier: (UITT *) touch {if (indicator == Tapper ) {Return! [Touch.view isKindOfClass: [UIControl class]];} Return yes;}   

This method stops the gesturecreaser being removed when a UI control (i.e. Button) is pressed.

No comments:

Post a Comment