SQFiltrateView.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // SQFiltrateView.h
  3. // FiltrateView
  4. //
  5. // Created by quanminqianbao on 2017/12/7.
  6. // Copyright © 2017年 yangshuquan. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "SQCustomButton.h"
  10. OS_ASSUME_NONNULL_BEGIN
  11. //筛选列表的类型
  12. typedef NS_ENUM(NSInteger, OptionListType) {
  13. OptionListType_Tag, //标签
  14. OptionListType_Cell, //列表
  15. };
  16. typedef NS_ENUM(NSInteger, OptionNumberType) {
  17. OptionNumberType_Single,//单选
  18. OptionNumberType_Many,//多选
  19. };
  20. @interface SQFiltrateItem:NSObject
  21. @property (nonatomic, assign) OptionListType listType;
  22. @property (nonatomic, assign) OptionNumberType numberType;
  23. @property (nonatomic, strong) NSString *title;
  24. @property (nonatomic, strong) NSArray *optionData;
  25. //@property (nonatomic, strong) NSString *key;//该字段可以自定义,用来标识
  26. //
  27. @property (nonatomic, strong) UIView *bg_View;
  28. @property (nonatomic, assign) BOOL isShow;
  29. @property (nonatomic, assign) CGFloat bg_ViewHeight;
  30. @property (nonatomic, strong) SQCustomButton *button;
  31. @property (nonatomic, strong) NSArray *listCellViews;
  32. @property (nonatomic, strong) NSMutableSet *choseSet;//
  33. @end
  34. @interface SQFiltrateView : UIView
  35. @property (nonatomic, strong) void(^touchBlock)(SQFiltrateView *view,SQFiltrateItem *item);
  36. @property (nonatomic, strong) NSArray *filtrateItems;
  37. - (instancetype)initWithFrame:(CGRect)frame filtrateItems:(NSArray <SQFiltrateItem *>*)filtrateItems;
  38. - (void)touchBlock:(void(^)(SQFiltrateView *view,SQFiltrateItem *item))block;
  39. //隐藏所有选项
  40. - (void)hideAllItemView;
  41. OS_ASSUME_NONNULL_END
  42. @end