0
私のアニメーションがアニメーション停止セレクタが呼び出されないのはなぜですか?
[UIView beginAnimations:@"swipe" context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(transitionDidStop:finished:context:)];
[UIView setAnimationDuration:0.3f];
//My Animation
[UIView commitAnimations];
を停止すると、私は、メソッドを呼び出すために、次のコードを使用していますが、これはtransitionDidStop方法
- (void)transitionDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
の署名であるしかし、私はこの方法をした後も呼び出されることはありませんことに気づきました移行は停止します。何故ですか?
を持っているので。ありがとう。私はメソッドの使用法のためのMoveMeサンプルを見て、それはNSNumberとして第2引数を指定します。奇妙な。再度ありがとう – lostInTransit
バグ?アップルのコードですか?決して! –
りんごコードの場合はNSNumberで動作します)) しかしドキュメント: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/ clm/UIView/setAnimationDidStopSelector ..... セレクタには、次のメソッドシグネチャが必要です。animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void *)context。 – oxigen