forked from thomas-cao/DropMenuBarExample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuAction.h
More file actions
33 lines (25 loc) · 929 Bytes
/
Copy pathMenuAction.h
File metadata and controls
33 lines (25 loc) · 929 Bytes
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
//
// MenuAction.h
// LinkageMenu
//
// Created by 魏小庄 on 2018/5/18.
// Copyright © 2018年 魏小庄. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ItemModel.h"
typedef NS_ENUM(NSInteger, MenuActionStyle) {
MenuActionTypeList,
MenuActionTypeCustom
};
@interface MenuAction : UIButton
@property (nonatomic, assign, readonly) MenuActionStyle actionStyle;
@property (nonatomic, copy, readonly) NSString *title;
// 数据源
@property (nonatomic, strong) NSArray <ItemModel *>*ListDataSource;
@property (nonatomic, copy) void(^didSelectedMenuResult)(NSInteger index, ItemModel *selecModel);
@property (nonatomic, copy) UIView *(^displayCustomWithMenu)(void);
+ (instancetype) actionWithTitle:(NSString *)title style:(MenuActionStyle)style;
-(void)adjustFrame;
/** 用于调整 自定义视图选中时文字的显示 */
- (void) adjustTitle:(NSString *)title textColor:(UIColor *)color;
@end