// // SelectView.h // SelectViewDemo // // Created by LanSha on 2017/8/8. // Copyright © 2017年 LanSha. All rights reserved. // #import @class SelectView; typedef NS_ENUM(NSInteger,ButtonClickType){ ButtonClickTypeNormal = 0, ButtonClickTypeUp = 1, ButtonClickTypeDown = 2, }; @protocol NY_SelectViewDelegate @optional //选中最上方的按钮的点击事件 - (void)selectTopButton:(SelectView *)selectView withIndex:(NSInteger)index withButtonType:(ButtonClickType )type; //确定按钮点击事件 - (void)filtrateViewMakeSureFromValue:(NSString *)fromValue toValue:(NSString *)toValue; //选中分类中按钮的点击事件 - (void)selectItme:(SelectView *)selectView withIndex:(NSInteger)index; //仅显示优惠券 - (void)selectItme:(SelectView *)selectView onlyTicketClick:(UIButton *)switchBtn; //综合排序 -(void)selectItme:(SelectView *)selectView sortDic:(NSDictionary *)selectDic; @end @interface SelectView : UIView @property (nonatomic, weak) iddelegate; //默认选中,默认是第一个 @property (nonatomic, assign) int defaultSelectIndex; //默认选中项,默认是第一个 @property (nonatomic, assign) int defaultSelectItmeIndex; //设置可选项数组 @property (nonatomic, copy) NSArray *selectItmeArr; @property(nonatomic,strong)UIButton *sortBtn; - (instancetype)initWithFrame:(CGRect)frame withArr:(NSArray *)arr; @end