objective-c ジェスチャー

いきついたソース

- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
	startLocation.x = self.navigationController.view.frame.origin.x;
}

- (void) handlePanGesture:(UIPanGestureRecognizer*) sender {
    UIPanGestureRecognizer* pan = (UIPanGestureRecognizer*) sender;
    CGPoint location = [pan translationInView:self.view];
    NSLog(@"pan m=%f, x=%f, y=%f", self.navigationController.view.frame.origin.x, location.x, location.y);
    
    //ドラッグ中の座標を使って移動
    self.navigationController.view.transform = CGAffineTransformMakeTranslation(startLocation.x + location.x, 0);

}

さらに最終的にいきついたソース

ジェスチャーのパンでやったほうがよい。