2 इशारा पहचानकर्ता कम से एक साथ आईओएस पिंच करें:पैन और 2 फिंगर एक ही समय
UIPinchGestureRecognizer *twoFingerPinch =
[[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinch:)];
[croppper addGestureRecognizer:twoFingerPinch];
UIPanGestureRecognizer *PanRecognizer = [[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)] autorelease];
[croppper addGestureRecognizer:PanRecognizer];
और:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
लेकिन एक ही समय में चुटकी और पैन से काम नहीं कर रहा है ... अक्सर मैं चुटकी कर सकता हूं क्योंकि पैन पहचानकर्ता चालू है।
संबंध
+1। दूसरे शब्दों में, अपने कोड में निम्नलिखित दो पंक्तियां जोड़ें: 'twoFingerPinch.delegate = self; 'और' PanRecognizer.delegate = self; '। लोअरकेस प्रारंभिक का उपयोग करने के लिए दूसरा इशारा रिकॉग्नाइज़र का नाम बदलने पर भी विचार करें। – Till
आपका अधिकार! धन्यवाद! (दोFingerPinch.delegate = self;) i – Phil
बेवकूफ वेब कैश - अब मेरा जवाब हास्यास्पद लगता है :( – deanWombourne