MenuView.h 959 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // MenuView.h
  3. // YHMenu
  4. //
  5. // Created by Boris on 2018/5/10.
  6. // Copyright © 2018年 Boris. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef void(^TouchBlock)(void);
  10. typedef void(^IndexBlock)(NSInteger row);
  11. @interface MenuView : UIView<UITableViewDelegate, UITableViewDataSource>
  12. @property (nonatomic, strong) UIView *backView;
  13. @property (nonatomic, copy) TouchBlock touchBlock;
  14. @property (nonatomic, copy) IndexBlock indexBlock;
  15. @property (nonatomic, assign) CGPoint point;
  16. @property (nonatomic, assign) CGFloat layerHeight, layerWidth;
  17. @property (nonatomic, strong) UITableView *tableView;
  18. @property (nonatomic, strong) NSMutableArray *titleSource, *imgSource;
  19. - (id)initWithFrame:(CGRect)frame
  20. menuWidth:(CGFloat)width
  21. height:(CGFloat)height
  22. point:(CGPoint)point
  23. items:(NSArray *)items
  24. imgSource:(NSArray *)imgSource
  25. action:(void(^)(NSInteger index))action;
  26. @end