MenuButton.h 649 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // MenuButton.h
  3. // CommonLibrary
  4. //
  5. // Created by AlexiChen on 14-1-17.
  6. // Copyright (c) 2014年 CommonLibrary. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "MenuAbleItem.h"
  10. #import "MenuItem.h"
  11. @interface MenuButton : UIButton<MenuAbleItem>
  12. @property (nonatomic, strong) UIImage *icon;
  13. @property (nonatomic, copy) NSString *title;
  14. - (instancetype)initWithTitle:(NSString *)title action:(MenuAction)action;
  15. - (instancetype)initWithBackground:(UIImage *)icon action:(MenuAction)action;
  16. - (instancetype)initWithMenu:(MenuItem *)item;
  17. - (void)setClickAction:(MenuAction)action;
  18. // protected
  19. - (void)onClick:(id)sender;
  20. @end