i want to open a left menu in the application that i develop. I can do it with a button but now the customer wants the left menu to be opened as much as the user panned the content view. For example the user panned content view 50 pix then i should open the left menu 50 pix. After a certain distance for example half of the content view's width i will open the left menu automatically. So i just want to know how much the user detected. I use such a code but it returns always 1 and 0
Code:
-(void)viewPanned:(UIPanGestureRecognizer *)sender {
CGPoint rect = [sender translationInView:self.rightView];
float currentX = rect.x;
NSLog(@"View Panned %f", currentX - self.previousX);
self.previousX = currentX;
}