我有一个附加到视图的手势识别器,我希望能够对点击发生时它调用的方法进行单元测试。我的手势识别器是这样创建的......
- (void)setupMyView {
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(myViewTapped)];
self.myView.userInteractionEnabled = YES;
[self.myView addGestureRecognizer:tap];
}
如何访问点击发生时调用的选择器 (myViewTapped) 的名称?
非常感谢您的智慧!