SDRecordButton 1.0.3

SDRecordButton 1.0.3

测试已测试
Obj-CObjective C
许可证 MIT
发布上次发布2016年9月

Sebastian Dobrincu 维护。




  • 作者
  • Sebastian Dobrincu

SDRecordButton

一个动画化的 UIButton 子类,设计为用作录音按钮。干净、可高度定制、轻量级。

添加到您的项目

您有两种方式可以将 SDRecordButton 添加到您的项目中

手动安装

简单地将 'SDRecordButton' 导入您的项目中,然后在您希望使用的类中导入以下内容

       #import "SDRecordButton.h";

Podfile

        platform :ios, '6.0'
        pod "SDRecordButton", "~> "1.0"

示例

SDRecordButton

检测录音状态

SDRecordButton 利用 UIButton 的目标 (target) 属性来检测状态变化。在您的视图控制器中为您的按钮实例添加以下目标:

    [recordButton addTarget:self action:@selector(recording) forControlEvents:UIControlEventTouchDown];
    [recordButton addTarget:self action:@selector(pausedRecording) forControlEvents:UIControlEventTouchUpInside];
    [recordButton addTarget:self action:@selector(pausedRecording) forControlEvents:UIControlEventTouchUpOutside];

例如,查看示例项目。

可用属性与方法

    buttonColor // UIColor - Main color of the button
    progressColor // UIColor - Color of the progress layer
    // Update loading progress of the button. From 0.0 to 1.0.
    - (void)setProgress:(CGFloat)progress; 

许可证

使用提供符合MIT 许可证。查看 LICENSE 获取详细信息。