Try this too,
Lets say you have all this five views added on the view of a viewController. Then do the following;
myViewController.view.multipleTouchEnabled = NO;
This make the mainView to process only first touch and only this first touch will flow down the hierarchy (i.e. to subViews and their gestureRecognizers )
Hope this works.
Alernate:
Define this in the interface of your mainView or mainViewController that holds the 5 views.
@property(nonatomic,retain)UIPanGestureRecognizer *currentRecognizer;
- Then apply the following code.
-(void)on_pan_gesture:(UIPanGestureRecognizer*) panGestureRecognizer
{
if(self.currentRecognizer != nil && [self.currentRecognizer isEqual:panGestureRecognizer])
{
//do the task of the selected gesture recognizer
//this recognizer will be active till the touches are not ended or cancelled.
//hence on the first recognizer will work.
}
else
{
//if there is not currentRecognizer then set this recognizer to be current.
self.currentRecognizer = panGestureRecognizer;
}
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
self.currentRecognizer = nil;
}
-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
{
self.currentRecognizer = nil;
}