我有一个滑块元素,我希望检测其上的touchesEnded操作。
我尝试以编程方式添加touchesEnded操作:
[self.slider touchesEnded:(NSSet *] touches withEvent:event];问题是我不知道从哪里获取touches变量(我假设事件参数是我希望在触摸结束后调用的函数)。
发布于 2011-10-24 19:02:21
为UISlider创建一个子类。实施
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
子类中的方法。将触摸事件委托给您的视图。
https://stackoverflow.com/questions/7874537
复制相似问题