forked from mmackh/KEYPullDownMenu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
KEYPullDownMenu.h
33 lines (23 loc) · 1.02 KB
/
KEYPullDownMenu.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
//
// KEYPullDownMenu.h
// Keydown
//
// Created by mmackh on 10/11/13.
// Copyright (c) 2013 Maximilian Mackh. All rights reserved.
//
#import <UIKit/UIKit.h>
@class KEYPullDownMenuItem;
typedef void(^dismissBlock)(KEYPullDownMenuItem *item, NSInteger selectedRow);
typedef void(^reorderBlock)(KEYPullDownMenuItem *item, NSInteger targetIndex);
typedef void(^deleteBlock)(KEYPullDownMenuItem *item);
@interface KEYPullDownMenu : UIView
+ (instancetype)openMenuInViewController:(UIViewController *)viewController items:(NSArray *)menuItems dismissBlock:dismissBlock reorderBlock:reorderBlock deleteBlock:deleteBlock;
+ (instancetype)dismissInViewController:(UIViewController *)viewController;
@end
@interface KEYPullDownMenuItem : NSObject
+ (instancetype)menuItemNamed:(NSString *)name deletable:(BOOL)deletable;
@property (nonatomic,readwrite, getter = isActive) BOOL active;
@property (nonatomic,readonly) NSString *name;
@property (nonatomic,readonly) BOOL deletable;
@property (nonatomic) NSMutableDictionary *dictionary;
@end