11
This commit is contained in:
29
ShenQi/UIButton+DSButtonBlock/UIButton+DSButtonBlock.h
Normal file
29
ShenQi/UIButton+DSButtonBlock/UIButton+DSButtonBlock.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user