0

HandlePanメソッドを持つ ViewController があります。

-(void)handlePan:(UIPanGestureRecognizer *)gestureRecognizer
{
    UIView *piece = [gestureRecognizer view];

    [self adjustAnchorPointForGestureRecognizer:gestureRecognizer];

    if ([gestureRecognizer state] == UIGestureRecognizerStateBegan || [gestureRecognizer state] == UIGestureRecognizerStateChanged) {
        CGPoint translation = [gestureRecognizer translationInView:[piece superview]];
        CGFloat panSpeed = (translation.x+translation.y)/2;
        NSLog(@"PanSpeed %f",panSpeed);
        [someview viewPan:panSpeed];
    }

}

次に、次のメソッドをUIView呼び出します。someview

- (void) viewPan:(float *)PanAngle {
    NSLog(@"Panning...%@",PanAngle);
}

しかし、私はnilfor を取得していPanAngleます。

これを行う適切な方法は何ですか?ありがとう!

4

1 に答える 1