CKAudioProgress 0.0.3

CKAudioProgress 0.0.3

GuoZhiQiang 维护。



  • 作者
  • cook

CKAudioProgress

简单的音视频进度条

效果

音视频进度条

安装

Podfile 文件里添加 pod 'CKAudioProgress'

然后在终端运行: pod install

注意:如果使用 pod search CKAudioProgress 搜不到,那么,你需要

pod setup
rm -rf ~/Library/Caches/Cocoapods

使用

有两种样式可以选择:

typedef NS_ENUM(NSInteger, CKAudioProgressType) {
    CKAudioProgressTypeNormal,  ///默认拖拽区域是个 实体圆圈
    CKAudioProgressTypeTimeline ///表示拖拽区域是个 显示时间的时间进度
};

1. 拖拽区域 是个实体圆圈

CKAudioProgressView *normalP = [[CKAudioProgressView alloc] initWithFrame:CGRectMake(0, 100, self.view.bounds.size.width, 50) type:CKAudioProgressTypeNormal];

2. 拖动区域是一个显示时间进度的区域

CKAudioProgressView *timelineP = [[CKAudioProgressView alloc] initWithFrame:CGRectMake(0, 200, self.view.bounds.size.width, 50) type:CKAudioProgressTypeTimeline];

可自定义的属性

  • UIColor *cachedBgColor 该属性表示 缓存进度背景颜色
  • UIColor *progressBgColor 该属性表示 进度条默认填充背景色
  • NSArray *colors

已播放进度条的渐变色,存储 CGColorRef 对象的数组*注意:该属性和 playedBgColor 二选一

  • UIColor *playedBgColor

已播放进度条背景颜色*注意:该属性和 colors 二选一

  • CGFloat cornerRadius 进度条的圆角
  • CGRect slideViewBounds 拖动区域(圆点或时间进度)的大小

代理方法

目前没有提供代理方法,只有 delegate 属性,可以自行定义 delegate 方法