QQPopMenuView.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // QQPopMenuView.h
  3. // ECLite
  4. //
  5. // Created by ec on 16/6/16.
  6. // Copyright © 2016年 eclite. All rights reserved.
  7. //
  8. /**
  9. * 类似QQ消息页popMenu
  10. */
  11. #import <UIKit/UIKit.h>
  12. @interface QQPopMenuView : UIView
  13. @property (nonatomic, copy) void (^hideHandle)();
  14. /**
  15. * 实例化方法
  16. *
  17. * @param array items,包含字典,字典里面包含标题(title)、图片名(imageName)
  18. * @param width 宽度
  19. * @param point 三角的顶角坐标(基于window)
  20. * @param action 点击回调
  21. */
  22. - (instancetype)initWithItems:(NSArray <NSDictionary *>*)array
  23. width:(CGFloat)width
  24. triangleLocation:(CGPoint)point
  25. action:(void(^)(NSInteger index))action;
  26. /**
  27. * 类方法展示
  28. *
  29. * @param array items,包含字典,字典里面包含标题(title)、图片名(imageName)
  30. * @param width 宽度
  31. * @param point 三角的顶角坐标(基于window)
  32. * @param action 点击回调
  33. */
  34. + (void)showWithItems:(NSArray <NSDictionary *>*)array
  35. width:(CGFloat)width
  36. triangleLocation:(CGPoint)point
  37. action:(void(^)(NSInteger index))action;
  38. - (void)show;
  39. - (void)hide;
  40. @end