UIPanGestureRecognizer
UIPanGestureRecognizer *recognizer = [[[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)]autorelease]; [recognizer delaysTouchesBegan]; [self.view addGestureRecognizer:recognizer]; - (void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer { NSLog(@"paniiii"); if(self.navigationController.viewControllers.count <=1 ) { return; } CGPoint point = [recoginzer translationInView:self.view]; NSLog(@"%f,%f",point.x,point.y); if(recoginzer.state == UIGestureRecognizerStateBegan) { } self.view.frame = CGRectMake(point.x, point.y, self.view.frame.size.width, self.view.frame.size.height); }