宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-07-05 0d8f5fc8a516bfd07e425909e4a4432600572ee7
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
76
77
//
//  XHPageControl.h
//  XHPageControl
//
//  Created by xuanhe on 2019/1/2.
//  Copyright © 2019 xuanhe. All rights reserved.
//
 
#import <UIKit/UIKit.h>
 
NS_ASSUME_NONNULL_BEGIN
 
typedef NS_ENUM(NSUInteger,XHPageControlType){
    PageControlMiddle = 0, //
    PageControlRight, //
    PageControlLeft //
};
 
 
@class XHPageControl;
@protocol XHPageControlDelegate <NSObject>
 
@optional
-(void)xh_PageControlClick:(XHPageControl*)pageControl index:(NSInteger)clickIndex;
 
@end
@interface XHPageControl : UIControl
 
//其他点是高度的倍数,默认1
@property(nonatomic) NSInteger otherMultiple;
//当前点h是高度的倍数,默认2
@property(nonatomic) NSInteger currentMultiple;
 
 
/**
 控件位置,默认中间
 */
@property (nonatomic, assign)   XHPageControlType type;
/*
 分页数量
 */
@property(nonatomic) NSInteger numberOfPages;
/*
 当前点所在下标
 */
@property(nonatomic) NSInteger currentPage;
/*
 点的大小
 */
@property(nonatomic) NSInteger controlSize;
/*
 点的间距
 */
@property(nonatomic) NSInteger controlSpacing;
/*
 其他未选中点颜色
 */
@property(nonatomic,strong) UIColor *otherColor;
/*
 当前点颜色
 */
@property(nonatomic,strong) UIColor *currentColor;
/*
 当前点背景图片
 */
@property(nonatomic,strong) UIImage *currentBkImg;
 
/*
 其他点背景图片
 */
@property(nonatomic,strong) UIImage *otherBkImg;
 
@property(nonatomic,weak)  id<XHPageControlDelegate > delegate;
 
@end
 
NS_ASSUME_NONNULL_END