You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.1 KiB
70 lines
1.1 KiB
// |
|
// WTListButton.h |
|
// me_watch |
|
// |
|
// Created by yuklng on 2017/1/20. |
|
// Copyright © 2017年 yuklng. All rights reserved. |
|
// |
|
|
|
#import <UIKit/UIKit.h> |
|
|
|
typedef void (^BlockListBtnClick) (id sender, NSInteger index); |
|
|
|
|
|
@interface WTListButton : UIButton |
|
|
|
@property (nonatomic,readonly) NSArray* text_list; |
|
|
|
@property (assign, nonatomic) NSInteger curIndex; //默认为0 |
|
|
|
@property (assign, nonatomic) bool clickOnClose; |
|
|
|
@property (strong, nonatomic) BlockListBtnClick block; |
|
|
|
|
|
|
|
/*! |
|
* 初始化,可选 |
|
* |
|
* @param text_list 显示列表文字 |
|
* |
|
* @param frame 控件坐标 |
|
* |
|
**/ |
|
-(instancetype)initWithList:(NSArray*)text_list frame:(CGRect)frame; |
|
|
|
|
|
|
|
/*! |
|
* 设置显示列表文字 |
|
* |
|
* @param text_list 显示列表文字 |
|
* |
|
**/ |
|
-(void)setText_list:(NSArray *)text_list; |
|
-(void)setText_list:(NSArray *)text_list block:(BlockListBtnClick)block; |
|
|
|
|
|
/*! |
|
* 显示组件 |
|
* |
|
**/ |
|
- (void)show; |
|
|
|
|
|
/*! |
|
* 在指定viewController上显示组件,推荐 |
|
* |
|
* @param vc 需要显示的viewController |
|
* |
|
**/ |
|
- (void)show:(UIViewController*)vc; |
|
|
|
|
|
/*! |
|
* 去除组件 |
|
* |
|
**/ |
|
- (void)hideAnimation; |
|
|
|
@end
|
|
|