6
Hiện nay tôi có mã này hoạt động tốtCocoa setAnimationDidStopSelector
[UIView setAnimationDidStopSelector:@selector(animationDone:finished:context:)];
- (void)animationDone:(NSString *)animationID finished:(BOOL)finished context:(void *)context {
// do stuff here
}
Logging giá trị của animationID mang lại cho tôi một null.
Làm cách nào để chuyển giá trị cho @selector?
tôi đã cố gắng
[UIView setAnimationDidStopSelector:@selector(animationDone:@"animation1"finished:context:)];
Đó mang lại cho tôi một lỗi.
Cảm ơn, Tee
này: '[UIView setAnimationDidStopSelector: @selector (animationDone: finished: context :)];' nên là: '[UIView setAnimationDidStopSelector: @selector (animationFinished: finished: contex t :)]; ' –
Cảm ơn bạn đã bình luận! Đã sửa. –