ConfirmBox.h
831 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// ConfirmBox.h
// DreamSleep
//
// Created by peter on 2022/10/19.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
// 确认框类型
typedef NS_ENUM(int, ConfirmBoxType) {
ConfirmBoxTypeDynDelete, // 个人动态删除
ConfirmBoxTypeBindMobile // 绑定手机
};
@protocol ConfirmBoxDelegate <NSObject>
@optional
/// 执行确认删除操作
/// @param indexPath indexPath
- (void)excuteDeleteAction:(NSIndexPath *)indexPath;
/// 跳转到绑定手机页面
- (void)jumpToBindMobilePage;
@end
/// 确认框
@interface ConfirmBox : UIView
@property (nonatomic, weak) id<ConfirmBoxDelegate> delegate;
- (instancetype)initWithDelegate:(id<ConfirmBoxDelegate>)delegate type:(ConfirmBoxType)type;
- (void)showConfirmBox:(NSIndexPath *)indexPath;
- (void)show;
- (void)dismiss;
@end
NS_ASSUME_NONNULL_END