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
| //
| // MuneBar.h
| // WKMuneController
| //
| // Created by macairwkcao on 16/1/26.
| // Copyright © 2016年 CWK. All rights reserved.
| //
|
| #import <UIKit/UIKit.h>
|
|
| typedef NS_OPTIONS(NSUInteger, MuneBarType){
| kMuneBarTypeRadLeft = 0,
| kMuneBarTypeRadRight,
| kMuneBarTypeLineTop,
| kMuneBarTypeLineBottom,
| kMuneBarTypeLineLeft,
| kMuneBarTypeLineRight,
| kMuneBarTypeRoundTop,
| kMuneBarTypeRoundBottom,
| kMuneBarTypeRoundLeft,
| kMuneBarTypeRoundRight,
| };
|
| @protocol CMuneBarDelegate <NSObject>
|
| @optional
| -(void)muneBarselected:(NSInteger)index;
| @optional
| -(void)muneBarShow;
| @optional
| -(void)muneBarHide;
|
| @end
|
|
| @interface CMuneBar : UIView
|
| @property(nonatomic,strong)NSArray *itemsImages;
|
| @property(nonatomic,weak)id <CMuneBarDelegate> delegate;
|
| @property(nonatomic,assign)MuneBarType type;
|
| @property(nonatomic,assign)BOOL isShow;
|
| @property(nonatomic,strong)UIButton *mainButton;
|
|
| /**
| * 初始化函数
| *
| * @param itemsImages 图片数组
| * @param size 尺寸
| *
| * @return
| */
| -(instancetype)initWithItems:(NSArray *)itemsImages size:(CGSize)size type:(MuneBarType)type;
| /**
| * 显示菜单
| */
| -(void)showItems;
| /**
| * 隐藏菜单
| */
| -(void)hideItems;
|
|
| @end
|
|