*大概思路:滑动页面,设置当前页的index,然后在index的set方法里面改变这些点的frame,以及颜色*
自定义view, .h 文件中
@interface WXPageControl : UIView
//page 个数
@property (assign, nonatomic) NSInteger pageCount;
//当前页
@property (assign, nonatomic) NSInteger currentIndex;
//没有选中的颜色
@property (strong, nonatomic) UIColor *unSelectedColor;
//选中时的颜色
@property (strong, nonatomic) UIColor *selectedColor;
@end
.m 文件中
#define kWidth [UIScreen mainScreen].bounds.size.width
#define kHeight [UIScreen mainScreen].bounds.size.height
@implementation WXPageControl
- (instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
self