Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bawn/lcanimatedpagecontrol
Custom UIPageControl with a simple animation
https://github.com/bawn/lcanimatedpagecontrol
animation custom-uipagecontrol
Last synced: about 3 hours ago
JSON representation
Custom UIPageControl with a simple animation
- Host: GitHub
- URL: https://github.com/bawn/lcanimatedpagecontrol
- Owner: bawn
- License: mit
- Created: 2015-06-17T09:55:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-19T10:10:47.000Z (over 7 years ago)
- Last Synced: 2024-10-18T22:35:32.120Z (29 days ago)
- Topics: animation, custom-uipagecontrol
- Language: Objective-C
- Homepage: http://bawn.github.io/ios/uipagecontrol/2015/06/16/LCAnimatedPageControl.html
- Size: 1.45 MB
- Stars: 149
- Watchers: 7
- Forks: 28
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LCAnimatedPageControl
![License MIT](https://img.shields.io/dub/l/vibe-d.svg)
![Pod version](http://img.shields.io/cocoapods/v/LCAnimatedPageControl.svg?style=flat)
![Platform info](http://img.shields.io/cocoapods/p/LCAnimatedPageControl.svg?style=flat)
[![Support](https://img.shields.io/badge/support-iOS%206%2B%20-blue.svg?style=flat)](https://www.apple.com/nl/ios/)![logo](logo.png)
Custom UIPageControl with a simple animation.
## Demo
__ LCSquirmPageStyle LCScaleColorPageStyle__
__ LCSquirmPageStyle LCFillColorPageStyle__
## Installation
CocoaPods:
```
pod 'LCAnimatedPageControl'
```## Example Usage
```
#import
```
```
self.pageControl = [[LCAnimatedPageControl alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 40, 280, 20)];
self.pageControl.center = CGPointMake(self.view.frame.size.width * 0.5f, _pageControl.center.y);
self.pageControl.pageStyle = LCScalePageStyle;
self.pageControl.numberOfPages = 5;
self.pageControl.indicatorMargin = 5.0f;
self.pageControl.indicatorMultiple = 1.6f;
self.pageControl.pageIndicatorColor = [UIColor redColor];
self.pageControl.currentPageIndicatorColor = [UIColor blackColor];
self.pageControl.sourceScrollView = _collectionView;
[self.pageControl prepareShow];
[self.view addSubview:_pageControl];
```Use the ScalePageStyle, If you want to scrollView to scroll to the non-adjacent location, Please realize the following protocol methods
```
- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView;{
[self.pageControl clearIndicators];
}
```## Requirements
* iOS 6 or higher
* ARC## More Info
[Blog](http://bawn.github.io/ios/uipagecontrol/2015/06/16/LCAnimatedPageControl.html)## License
[MIT](http://mit-license.org/)