检测 Xcode 中某个对象的触摸
这个伪代码的 Xcode 代码是什么?
if ([Any UIPickerView in my ViewController isTouched]) {
[AnyUIView setHidden:NO];
}
if ([Any UIPickerView in my ViewController is__NOT__Touched__Anymore__]) {
[AnyUIView setHidden:YES];
}
尝试使用 -(void)touchesBegan
方法,它检测到触摸,但我无法使其特定于对象。谢谢
我想在触摸 UIPickerView
时在显示屏上显示提示。
What's the Xcode code for this pseudocode?
if ([Any UIPickerView in my ViewController isTouched]) {
[AnyUIView setHidden:NO];
}
if ([Any UIPickerView in my ViewController is__NOT__Touched__Anymore__]) {
[AnyUIView setHidden:YES];
}
Tried it with the -(void)touchesBegan
method, it detects the touches but I was not able to make it object-specific. Thanks
P.S. I want to display a hint on the display while the UIPickerView
is touched.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这只是我的想法......但你应该能够明白......
并用
touchesEnded:withEvent:
做同样的事情This is just from the top of my head...... but you should be able to get the idea...
..and do the same with
touchesEnded:withEvent: