TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Sep 2016 |
Maintained by Sebastian Dobrincu.
An animated UIButton subclass, meant to be used as a recording button. Clean, highly customizable, lightweight.
There are 2 ways you can add SDRecordButton to your project:
Simply import the 'SDRecordButton' into your project then import the following in the class you want to use it:
#import "SDRecordButton.h";
platform :ios, '6.0'
pod "SDRecordButton", "~> "1.0"
SDRecordButton makes use of UIButton's target property to detect state changes. In your view controller add the following targets to your button instance:
[recordButton addTarget:self action:@selector(recording) forControlEvents:UIControlEventTouchDown];
[recordButton addTarget:self action:@selector(pausedRecording) forControlEvents:UIControlEventTouchUpInside];
[recordButton addTarget:self action:@selector(pausedRecording) forControlEvents:UIControlEventTouchUpOutside];
For examples, check out the demo project.
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;
Usage is provided under the MIT License. See LICENSE for the full details.