UIView(FWBlock)
@interface UIView (FWBlock)
/// 添加点击手势事件,默认子视图也会响应此事件。如要屏蔽之,解决方法:1、子视图设为UIButton;2、子视图添加空手势事件
- (void)fw_addTapGestureWithTarget:(id)target action:(SEL)action NS_REFINED_FOR_SWIFT;
/// 添加点击手势句柄,同上
- (NSString *)fw_addTapGestureWithBlock:(void (^)(id sender))block NS_REFINED_FOR_SWIFT;
/// 根据唯一标志移除点击手势句柄
- (void)fw_removeTapGesture:(nullable NSString *)identifier NS_REFINED_FOR_SWIFT;
/// 移除所有点击手势
- (void)fw_removeAllTapGestures NS_REFINED_FOR_SWIFT;
@end
Undocumented
-
添加点击手势事件,默认子视图也会响应此事件。如要屏蔽之,解决方法:1、子视图设为UIButton;2、子视图添加空手势事件
Declaration
Objective-C
- (void)fw_addTapGestureWithTarget:(nonnull id)target action:(nonnull SEL)action;
-
添加点击手势句柄,同上
Declaration
Objective-C
- (nonnull NSString *)fw_addTapGestureWithBlock: (nonnull void (^)(id _Nonnull))block;
-
根据唯一标志移除点击手势句柄
Declaration
Objective-C
- (void)fw_removeTapGesture:(nullable NSString *)identifier;
-
移除所有点击手势
Declaration
Objective-C
- (void)fw_removeAllTapGestures;