CPKenburnsView, CPKenburnsView是 ken burns的特效

分享于 

2分钟阅读

GitHub

  繁體 雙語
CPKenburnsView is ken burns effect
  • 源代码名称:CPKenburnsView
  • 源代码网址:http://www.github.com/muukii/CPKenburnsView
  • CPKenburnsView源代码文档
  • CPKenburnsView源代码下载
  • Git URL:
    git://www.github.com/muukii/CPKenburnsView.git
    Git Clone代码到本地:
    git clone http://www.github.com/muukii/CPKenburnsView
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/muukii/CPKenburnsView
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
    CPKenburnsImageView

    这里是 快速版本>

    Ken效果

    灵感 by Heyday

    启用幻灯片放映 !

    CPKenburnsSlideshowView

    
    pod 'CPKenburnsView'
    
    
    
    
    SampleMovie屏幕快照

    screenshot1screenshot1

    :如何使用

    示例
     CPKenburnsView *kenburnsView = [[CPKenburnsView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
     kenburnsView.image = [UIImage imageNamed:@"2.png"];
     [self.view addSubview:kenbunrsView];
    命令行选项
    typedefNS_ENUM(NSInteger, CPKenburnsImageViewZoomCourse) {
     CPKenburnsImageViewZoomCourseRandom = 0,
     CPKenburnsImageViewZoomCourseUpperLeftToLowerRight = 1,
     CPKenburnsImageViewZoomCourseUpperRightToLowerLeft = 2,
     CPKenburnsImageViewZoomCourseLowerLeftToUpperRight = 3,
     CPKenburnsImageViewZoomCourseLowerRightToUpperLeft = 4};
    @interfaceCPKenburnsView : 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

    Effect  BURN  
    相关文章