Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须创建一个标签栏。如果我在标签栏上单击一下,标签应该会读到一些引号。
同样,它应该识别这些触摸手势并在标签中显示文本:
1) 双击
2) 1 根手指:从上到下滑动。
我怎样才能做到这一点?
对于水龙头,您可以使用[UITapGestureRecognzer][1]
[UITapGestureRecognzer][1]
对于滑动,您可以使用[UISwipeGestureRecognizer][2]
[UISwipeGestureRecognizer][2]
对于所有可用的手势,请查看[UIGestureRecognizer][3]文档
[UIGestureRecognizer][3]
UIView您可以使用该addGestureRecognizer方法将这些手势识别器添加到
UIView
addGestureRecognizer