本文共 349 字,大约阅读时间需要 1 分钟。
UITapGestureRecognizer是UIGestureRecognizer的子类。
UITapGestureRecognizer除了继承UIGestureRecognizer的属性外,还提供如下俩个属性:numberOfTapRequired: //指定该手势处理器只处理几次触碰事件numberOfTouchesRequired: //指定该手势处理器只处理几个手指的触碰事件
示例:为应用中间的UIView添加UITapGestureRecognizer手势处理器,通过该手势处理器来处理用户的点击手势,程序会在界面上方的UILabel中显示用户的手势。
@interface FKViewController : UIViewController@property (