-
Notifications
You must be signed in to change notification settings - Fork 186
/
HyPopMenuView.h
129 lines (105 loc) · 2.93 KB
/
HyPopMenuView.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
//
// HyPopMenuView.h
// HyPopMenuView
//
// Created by H y on 15/9/8.
// Copyright (c) 2015年 ouy.Aberi. All rights reserved.
//
#import "HyPopMenuViewDelegate.h"
#import "PopMenuButton.h"
#import "PopMenuModel.h"
#import <UIKit/UIKit.h>
/**
* 弹出动画类型
* animation Type
*/
typedef NS_ENUM(NSUInteger, HyPopMenuViewAnimationType) {
/**
* 仿新浪App弹出菜单。
* Sina App fake pop-up menu
*/
HyPopMenuViewAnimationTypeSina,
/**
* 带有粘性的动画
* Animation with viscous
*/
HyPopMenuViewAnimationTypeViscous,
/**
* 底部中心点弹出动画
* The bottom of the pop-up animation center
*/
HyPopMenuViewAnimationTypeCenter,
/**
* 左和右弹出动画
* Left and right pop Anime
*/
HyPopMenuViewAnimationTypeLeftAndRight,
};
typedef enum : NSUInteger {
/**
* light模糊背景类型。
* light blurred background type.
*/
HyPopMenuViewBackgroundTypeLightBlur,
/**
* dark模糊背景类型。
* dark blurred background type.
*/
HyPopMenuViewBackgroundTypeDarkBlur,
/**
* 偏白半透明背景类型。
* Partial white translucent background type.
*/
HyPopMenuViewBackgroundTypeLightTranslucent,
/**
* 偏黑半透明背景类型。
* Partial translucent black background type.
*/
HyPopMenuViewBackgroundTypeDarkTranslucent,
/**
* 白~黑渐变色。
* Gradient color.
*/
HyPopMenuViewBackgroundTypeGradient,
} HyPopMenuViewBackgroundType; //背景类型
//Background type
@interface HyPopMenuView : UIView
/*=====================================================================================*/
@property (nonatomic, retain) NSArray<PopMenuModel*>* dataSource;
/**
* 背景类型默认为 'HyPopMenuViewBackgroundTypeLightBlur'
* The default is 'HyPopMenuViewBackgroundTypeLightBlur'
*/
@property (nonatomic, assign) HyPopMenuViewBackgroundType backgroundType;
/**
* 动画类型
* animation Type
*/
@property (nonatomic, assign) HyPopMenuViewAnimationType animationType;
/**
* 自动识别颜色主题,默认为关闭。
* The default is false.
*/
@property (nonatomic, assign) BOOL automaticIdentificationColor;
/**
* HyPopMenuViewDelegate
*/
@property (nonatomic, assign) id<HyPopMenuViewDelegate> delegate;
/**
* 默认为 10.0f 取值范围: 0.0f ~ 20.0f
* default is 10.0f Range: 0 ~ 20
*/
@property (nonatomic, assign) CGFloat popMenuSpeed;
/**
* 顶部自定义View
*/
@property (nonatomic, strong) UIView* topView;
+ (instancetype)sharedPopMenuManager;
- (void)openMenu;
- (void)closeMenu;
- (BOOL)isOpenMenu;
@end
UIKIT_EXTERN NSString* const HyPopMenuViewWillShowNotification;
UIKIT_EXTERN NSString* const HyPopMenuViewDidShowNotification;
UIKIT_EXTERN NSString* const HyPopMenuViewWillHideNotification;
UIKIT_EXTERN NSString* const HyPopMenuViewDidHideNotification;