| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- //
- // SelectBoxView.h
- // WebSocketDemo
- //
- // Created by 刘云鸽 on 2019/2/27.
- // Copyright © 2019年 liuyunge. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- /**
- IBInspectable和IB_DESIGNABLE
- 是方便Xib 预览的作用
- */
- @class SelectBoxView;
- @protocol SelectBoxViewDelegate<NSObject>
- @optional
- -(void)selectBoxView:(SelectBoxView *)boxView selectedIndex:(NSInteger)selectedIndex;
- @end
- @interface SelectBoxView : UIView
- /**
- 标题名
- */
- @property(nonatomic,strong) NSString *title;
- /**
- 标题颜色
- */
- @property(nonatomic,strong)UIColor *titleColor;
- /**
- 标题字体大小
- */
- @property(nonatomic,assign)CGFloat titleFontSize;
- /**
- 视图圆角
- */
- @property(nonatomic,assign)CGFloat cornerRadius;
- /**
- 视图边框颜色
- */
- @property(nonatomic,strong)UIColor *borderColor;
- /**
- 边框宽度
- */
- @property(nonatomic,assign)CGFloat borderWidth;
- /**
- cell高度
- */
- @property(nonatomic,assign)CGFloat rowHeight;
- /**
- 数据源
- */
- @property(nonatomic,strong)NSMutableArray *dataSource;
- /**
- 标题控件
- */
- @property (nonatomic, strong) UILabel *titleLabel;
- /**
- 右边箭头图片
- */
- @property (nonatomic, strong) UIImageView *rightImageView;
- /**
- 控件透明按钮,也可以给控件加手势
- */
- @property (nonatomic, strong) UIButton *maskBtn;
- /**
- 选项列表
- */
- @property (nonatomic, strong) UITableView *tableView;
- /**
- 蒙版
- */
- @property (nonatomic, strong) UIButton *backgroundBtn;
- /**
- tableView的高度
- */
- @property (nonatomic, assign) CGFloat tableViewHeight;
- @property (nonatomic, assign) BOOL isDirectionUp;
- @property(nonatomic,weak) id<SelectBoxViewDelegate> delegate;
- @property(nonatomic,copy) void(^selectedBlock)(SelectBoxView *boxView,NSInteger selectedIndex);
- -(instancetype)initWithFrame:(CGRect)frame dataSource:(NSMutableArray *)dataSource;
- @end
|