CCKenburnsView 1.0.1

CCKenburnsView 1.0.1

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2014年12月

未指定 维护。



  • muukii

CPKenburnsImageView

Ken Burns Effect

灵感来自 Heyday

启用幻灯片播放功能!

CPKenburnsSlideshowView


pod 'CPKenburnsView'

示例电影

截图

screenshot1 screenshot1

如何使用

示例

    CPKenburnsView *kenburnsView = [[CPKenburnsView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
    kenburnsView.image = [UIImage imageNamed:@"2.png"];
    [self.view addSubview:kenbunrsView];

选项

typedef NS_ENUM(NSInteger, CPKenburnsImageViewZoomCourse) {
    CPKenburnsImageViewZoomCourseRandom                = 0,
    CPKenburnsImageViewZoomCourseUpperLeftToLowerRight = 1,
    CPKenburnsImageViewZoomCourseUpperRightToLowerLeft = 2,
    CPKenburnsImageViewZoomCourseLowerLeftToUpperRight = 3,
    CPKenburnsImageViewZoomCourseLowerRightToUpperLeft = 4
};
@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