Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muukii/CPKenburnsView
CPKenburnsView is ken burns effect
https://github.com/muukii/CPKenburnsView
Last synced: 3 months ago
JSON representation
CPKenburnsView is ken burns effect
- Host: GitHub
- URL: https://github.com/muukii/CPKenburnsView
- Owner: muukii
- License: mit
- Created: 2014-04-03T15:43:30.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-13T02:27:20.000Z (about 9 years ago)
- Last Synced: 2024-11-18T14:09:52.940Z (3 months ago)
- Language: Objective-C
- Size: 5.6 MB
- Stars: 105
- Watchers: 10
- Forks: 19
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
CPKenburnsImageView
===================## Swift version -> [Here](https://github.com/ra1028/KenBurnsSlideshowView)
### Ken Burns Effect
inspired by Heyday
## Enable slideshow!
[CPKenburnsSlideshowView](https://github.com/muukii0803/CPKenburnsSlideshowView)
----
```
pod 'CPKenburnsView'
```
#### [SampleMovie](http://f.cl.ly/items/3R0n3x291924413z1Y44/sampleMovie.mp4)#### Screen shots

### How to use
#### Example```Objective-C
CPKenburnsView *kenburnsView = [[CPKenburnsView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
kenburnsView.image = [UIImage imageNamed:@"2.png"];
[self.view addSubview:kenbunrsView];
```#### Options
```Objective-C
typedef NS_ENUM(NSInteger, CPKenburnsImageViewZoomCourse) {
CPKenburnsImageViewZoomCourseRandom = 0,
CPKenburnsImageViewZoomCourseUpperLeftToLowerRight = 1,
CPKenburnsImageViewZoomCourseUpperRightToLowerLeft = 2,
CPKenburnsImageViewZoomCourseLowerLeftToUpperRight = 3,
CPKenburnsImageViewZoomCourseLowerRightToUpperLeft = 4
};
``````Objective-C
@interface CPKenburnsView : UIView
@property (nonatomic, copy) UIImage * image;
@property (nonatomic, assign) CGFloat animationDuration; //default is 13.f
@property (nonatomic, assign) CGFloat zoomRatio; // default 0.1 0 ~ 1
@property (nonatomic, assign) CGFloat endZoomRate; // default 1.2
@property (nonatomic, assign) CGFloat startZoomRate; // default 1.3
@property (nonatomic, assign) CPKenburnsImageViewZoomCourse course; // default is 0- (void)restartMotion;
@end
```