有什么方法可以记录然后播放 UIApplication 的所有 UIEvents?
主要思想是记录测试场景,然后播放并比较结果。
在子类化 UIApplication 之后,我已经设法获取所有应用程序事件,但我仍然无法延迟播放它们。
@interface MyApplication : UIApplication
@end
@implementation MyApplication
(void)sendEvent:(UIEvent*)event
{
[super performSelector:@selector(sendEvent:) withObject:event afterDelay:0.0]; // nothing happens
}