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);
}
しかし、私はnil
for を取得していPanAngle
ます。
これを行う適切な方法は何ですか?ありがとう!