I have a view with UIPanGestureRecognizer
.
UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]
initWithTarget:self action:@selector(handlePan:)];
[recognizer setMaximumNumberOfTouches:1];
[recognizer setDelegate:self];
[self.view addGestureRecognizer: recognizer];
=======
-(void) handlePan:(UIPanGestureRecognizer*)gestureRecognizer
{
move subview of self.view
}
subview have a scroll view inside. how to capture gesture with event -handlePan:
when scroll view is at the end of horizontal scrolling?
I am working with panGesture since last week. It seems to me there are two issues here;
1)UX design. UIScrollView : UIView is "touch" recognizable
- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view;
UIPangestureRecognizer also detects "touch".
- (CGPoint)locationOfTouch:(NSUInteger)touchIndex inView:(UIView*)view; // the location of a particular touch
From a user's experience point of view, how do you indicate the differences between TWO TOUCHES in ONE UI area, purely for the design aspect.
2) Code. It looks like you just want to pan a view (UIScrollView, or other UIView's views)
}