30 lines
496 B
Objective-C
30 lines
496 B
Objective-C
//
|
|
// UIButton+DSButtonBlock.h
|
|
// DSChat
|
|
//
|
|
// Created by Mac on 2022/6/14.
|
|
// Copyright © 2022 DS. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
typedef void(^ButtonBlock)(UIButton * _Nullable btn);
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface UIButton (DSButtonBlock)
|
|
|
|
/**
|
|
* button 添加点击事件
|
|
*/
|
|
- (void)addAction:(ButtonBlock)block;
|
|
|
|
/**
|
|
* button 添加事件
|
|
*/
|
|
- (void)addAction:(ButtonBlock)block forControlEvents:(UIControlEvents)controlEvents;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|