Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackxhj/EllipsePageControl
椭圆形 长方形 PageControl 轮播图点
https://github.com/hackxhj/EllipsePageControl
Last synced: about 2 months ago
JSON representation
椭圆形 长方形 PageControl 轮播图点
- Host: GitHub
- URL: https://github.com/hackxhj/EllipsePageControl
- Owner: hackxhj
- License: mit
- Created: 2017-07-26T08:13:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T09:38:54.000Z (over 3 years ago)
- Last Synced: 2024-10-31T15:35:14.683Z (3 months ago)
- Language: Objective-C
- Homepage:
- Size: 105 KB
- Stars: 151
- Watchers: 4
- Forks: 36
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - EllipsePageControl - 椭圆形 长方形 PageControl 轮播图点。 (OOM-Leaks-Crash / PageControl)
README
## 椭圆 长方形的 PageControl 自定义
```objc
@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; // 当前点背景颜色
```使用例子:
### 支持pod导入
```ruby
pod 'EllipsePageControl','~> 0.0.4'
```### 头文件引入
#import "EllipsePageControl.h"
### 定义
```objc
@property(nonatomic,strong) EllipsePageControl *myPageControl1;
```
### 使用```objc
_myPageControl1 = [[EllipsePageControl alloc] init];_myPageControl1.frame=CGRectMake(0, 80,[UIScreen mainScreen].bounds.size.width, 30);
_myPageControl1.numberOfPages = 6;
_myPageControl1.delegate=self;
[self.view addSubview:_myPageControl1];
### #pragma mark EllipsePageControlDelegate。监听用户点击
-(void)ellipsePageControlClick:(EllipsePageControl *)pageControl index:(NSInteger)clickIndex{
}
```
### 看效果图 demo 详细使用