https://github.com/cemolcay/recbutton
An @IBDesignable record (REC) button for iOS
https://github.com/cemolcay/recbutton
button ibdesignable ibinspectable ios record
Last synced: 11 months ago
JSON representation
An @IBDesignable record (REC) button for iOS
- Host: GitHub
- URL: https://github.com/cemolcay/recbutton
- Owner: cemolcay
- License: mit
- Created: 2020-01-06T09:08:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T17:56:03.000Z (over 6 years ago)
- Last Synced: 2025-04-06T10:53:24.278Z (about 1 year ago)
- Topics: button, ibdesignable, ibinspectable, ios, record
- Language: Ruby
- Homepage:
- Size: 789 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
RECButton
===
An @IBDesignable record (REC) button for iOS.
* iOS 9.0+
* Swift 5.0+
Install
----
``` sh
pod RECButton
```
Usage
----

* RECButton is a UIButton subclass
* Create a RECButton instance either from storyboard or programmatically.
* Set the color and size properties for recording state and non-recording state.
* Those are also IBInspectable, settable directly from the storyboard.
* Set other inherited UIButton properties.
``` swift
@IBInspectable public var ringColor: UIColor = .white
@IBInspectable public var dotColor: UIColor = .white
@IBInspectable public var recordingDotColor: UIColor = .red
@IBInspectable public var recordingRingColor: UIColor = .orange
@IBInspectable public var dotPadding: CGFloat = 2
@IBInspectable public var ringLineWidth: CGFloat = 1
@IBInspectable public var recordingRingDashPattern: String?
@IBInspectable public var recordingAnimationDuration: CGFloat = 0
@IBInspectable public var isRecording: Bool = false
```
Recording
----
* Set `isRecording` bool value.
