12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // SelectView.h
- // SelectViewDemo
- //
- // Created by LanSha on 2017/8/8.
- // Copyright © 2017年 LanSha. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- @class SelectView;
- typedef NS_ENUM(NSInteger,ButtonClickType){
- ButtonClickTypeNormal = 0,
- ButtonClickTypeUp = 1,
- ButtonClickTypeDown = 2,
- };
- @protocol NY_SelectViewDelegate <NSObject>
- @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) id<NY_SelectViewDelegate>delegate;
- //默认选中,默认是第一个
- @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
|