JX_DownListView.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // JX_DownListView.h
  3. // shiku_im
  4. //
  5. // Created by 1 on 17/5/24.
  6. // Copyright © 2017年 Reese. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef enum : NSUInteger {
  10. DownListView_ShowDown = 0, // 默认显示在指定控件下方
  11. DownListView_ShowUp,
  12. DownListView_Center,
  13. } JX_DownListViewShowType;
  14. typedef void(^DownListPopOptionBlock)(NSInteger index, NSString *content);
  15. @interface JX_DownListView : UIView
  16. @property (nonatomic, strong) NSArray <NSString *>*listContents; // 内容数组 必要
  17. @property (nonatomic, strong) NSArray <NSString *>*listImages; // 图片数组 非必要
  18. @property (nonatomic, strong) NSArray <NSNumber *>*listEnables; // 可用数组 非必要
  19. @property (nonatomic, strong) UIColor *color; // 背景色
  20. @property (nonatomic, assign) CGFloat maxWidth;
  21. @property (nonatomic, assign) CGFloat lineHeight; // 行高 如果不设置默认为40.0f
  22. @property (nonatomic, assign) CGFloat mutiple; // 宽度比 如果不设置默认为0.35f
  23. @property (nonatomic ,assign) float animateTime; // 设置动画时长 如果不设置默认0.2f秒 如果设置为0为没有动画
  24. @property (nonatomic, assign) JX_DownListViewShowType showType; // 显示在控件的上方或下方type,默认下方
  25. @property (nonatomic, strong) UIColor *textColor; // 字体颜色
  26. -(instancetype)downlistPopOption:(DownListPopOptionBlock)block whichFrame:(CGRect)frame animate:(BOOL)animate;
  27. -(void)show;
  28. @end