线上所有马甲包模板,与《猎豆》同UI。域名zhuadd

SelectView.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // SelectView.h
  3. // SelectViewDemo
  4. //
  5. // Created by LanSha on 2017/8/8.
  6. // Copyright © 2017年 LanSha. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class SelectView;
  10. typedef NS_ENUM(NSInteger,ButtonClickType){
  11. ButtonClickTypeNormal = 0,
  12. ButtonClickTypeUp = 1,
  13. ButtonClickTypeDown = 2,
  14. };
  15. @protocol NY_SelectViewDelegate <NSObject>
  16. @optional
  17. //选中最上方的按钮的点击事件
  18. - (void)selectTopButton:(SelectView *)selectView withIndex:(NSInteger)index withButtonType:(ButtonClickType )type;
  19. //确定按钮点击事件
  20. - (void)filtrateViewMakeSureFromValue:(NSString *)fromValue toValue:(NSString *)toValue;
  21. //选中分类中按钮的点击事件
  22. - (void)selectItme:(SelectView *)selectView withIndex:(NSInteger)index;
  23. //仅显示优惠券
  24. - (void)selectItme:(SelectView *)selectView onlyTicketClick:(UIButton *)switchBtn;
  25. //综合排序
  26. -(void)selectItme:(SelectView *)selectView sortDic:(NSDictionary *)selectDic;
  27. @end
  28. @interface SelectView : UIView
  29. @property (nonatomic, weak) id<NY_SelectViewDelegate>delegate;
  30. //默认选中,默认是第一个
  31. @property (nonatomic, assign) int defaultSelectIndex;
  32. //默认选中项,默认是第一个
  33. @property (nonatomic, assign) int defaultSelectItmeIndex;
  34. //设置可选项数组
  35. @property (nonatomic, copy) NSArray *selectItmeArr;
  36. @property(nonatomic,strong)UIButton *sortBtn;
  37. - (instancetype)initWithFrame:(CGRect)frame withArr:(NSArray *)arr;
  38. @end