1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 02:17:51 +01:00
Telegram/Watch/Extension/TGInterfaceMenu.h
2015-10-01 19:19:52 +03:00

26 lines
1005 B
Objective-C

#import <WatchKit/WatchKit.h>
@class TGInterfaceMenuItem;
@class TGInterfaceController;
typedef void (^TGInterfaceMenuItemActionBlock)(TGInterfaceController *controller, TGInterfaceMenuItem *sender);
@interface TGInterfaceMenuItem : NSObject
- (instancetype)initWithImage:(UIImage *)image title:(NSString *)title actionBlock:(TGInterfaceMenuItemActionBlock)actionBlock;
- (instancetype)initWithImageNamed:(NSString *)imageName title:(NSString *)title actionBlock:(TGInterfaceMenuItemActionBlock)actionBlock;
- (instancetype)initWithItemIcon:(WKMenuItemIcon)itemIcon title:(NSString *)title actionBlock:(TGInterfaceMenuItemActionBlock)actionBlock;
@end
@interface TGInterfaceMenu : NSObject
- (instancetype)initForInterfaceController:(TGInterfaceController *)interfaceController;
- (instancetype)initForInterfaceController:(TGInterfaceController *)interfaceController items:(NSArray *)items;
- (void)addItem:(TGInterfaceMenuItem *)item;
- (void)addItems:(NSArray *)items;
- (void)clearItems;
@end