【发布时间】:2010-10-19 10:23:02
【问题描述】:
我正在使用一些 UIView 动画的东西
[UIView beginAnimations:nil context:nil];
// ... Animation configuration ...
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationEnded:finished:context:)];
[UIView commitAnimations];
关于以下问题:Apple rejected app because of animationDidStop:finished:context: is a non-public api
我将自己的方法实现为“setAnimationDidStopSelector”。
我的问题是关于 context:(void *)context 参数。苹果将其定义如下:
其他应用程序提供 传递给 动画委托消息—— 选择器设置使用 setAnimationWillStartSelector:和 setAnimationDidStopSelector:方法。
我想知道什么东西之王可以作为上下文传递。我对 Objective-C 和 C 编程比较陌生,对 void* 类型有点迷茫。
我们可以传入任何类型的参数、对象、NSDictionnary、NSString 等吗?
谢谢
【问题讨论】:
标签: iphone ios uiviewanimation