我有一个手势识别器连接到一个视图上,我希望能够单元测试它在点击发生时调用的方法。我的手势识别器创建如下...
- (void)setupMyView {
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(myViewTapped)];
self.myView.userInteractionEnabled = YES;
[self.myView addGestureRecognizer:tap];
}
当发生点击事件时,我如何访问调用选择器(myViewTapped)的名称?
非常感谢您提前的帮助!