I am working on an iphone (iOS 4.0 or later) app and having some troubles with touch handling between multiple views. I am having a view structure like this
If bView has pinch gesture. From bView's pinch gesture action if called aView's pinch gesture action then...
UIPinchGestureRecognizer *pinchA = [[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(handlePinchA:)];
[aView addGestureRecognizer:pinchA];
[pinchA release];
UIPinchGestureRecognizer *pinchB = [[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(handlePinchB:)];
[bView addGestureRecognizer:pinchB];
[pinchB release];
-(void)handlePinchA:(UIGestureRecognizer*)gestureRecognizer
{
NSLog(@"handlePinch on A");
}
-(void)handlePinchB:(UIGestureRecognizer*)gestureRecognizer
{
NSLog(@"handlePinch on B");
[self handlePinchA:gestureRecognizer];
}
aView is a thirdParty lib. Can you call handlePinchA method from outside? NSLog gestureRecognizers prints me action=handlePinchA
NSLog(@"gestureRecognizers %@", [aView gestureRecognizers]);
Prints me:
gestureRecognizers (
"; target= <(action=handlePinchA:, target=....