ZXWSegmentControl.h
1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//
// ZXWSegmentControl.h
// LoongsCity
//
// Created by loongs_zxw on 2017/11/15.
// Copyright © 2017年 xiaoxiong. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ZXWSegmentControl : UIView
/**
* 初始化静止标题栏(不可左右拖动)
*/
- (instancetype)initStaticTitlesWithFrame:(CGRect)frame;
/**
* 初始化滑动标题栏(可以左右拖动)
*/
- (instancetype)initScrollTitlesWithFrame:(CGRect)frame;
/**
* 初始化滑动标题栏(可以左右拖动)
*/
- (instancetype)initScrollTitlesWithFrame:(CGRect)frame viewController:(CNLiveBaseViewController *)vc;
/**
* 标题数组
*/
@property (strong, nonatomic) NSArray * titles;
/**
*选中标题颜色
*/
@property (strong, nonatomic) NSArray *textColors;
/**
* 控制器数组
*/
@property (strong, nonatomic) NSArray * viewControllers;
/**
* 标题正常字体颜色
*/
@property (strong, nonatomic) UIColor * titleNormalColor;
/**
* 标题选中字体颜色
*/
@property (strong, nonatomic) UIColor * titleSelectColor;
/**
* 标题是否支持缩放(默认不支持)
*/
@property (assign, nonatomic) BOOL isTitleScale;
/**
* 标题是否选中(默认第一个)
*/
@property (assign, nonatomic) NSInteger current;
/**
* 设置底部栏颜色(和底部栏图片只能设置一个)
*/
- (void)setBottomViewColor:(UIColor *)color;
/**
* 设置底部栏图片(和底部栏颜色只能设置一个)
*/
- (void)setBottomViewImage:(UIImage *)image;
/**
* 取消底部栏
*/
- (void)cancelBottomView;
@end