EqualizerIndicatorView
is Swift UI component to indicate the current status of audio. The design is inspired by Apple's Music app.
An example project is included to demonstrate how to use an indicator with storyboards. To run the project, run pod install
from the Example directory first.
Install the library through CocoaPods. Add the following line to your Podfile, then run pod install
.
pod 'EqualizerIndicatorView', '~> 2.0'
Be sure to import the library when needed.
import EqualizerIndicatorView
EqualizerIndicatorView
can reflect the play, pause, and stop states of audio. Initialize and animate an indicator as follows.
let frame = CGRect(x: 0, y: 0, width: 24, height: 18)
let equalizerIndicatorView = EqualizerIndicatorView(frame: frame)
equalizerIndicatorView.setState(.play, animated: true)
equalizerIndicatorView.setState(.pause, animated: true)
equalizerIndicatorView.setState(.stop, animated: true)
EqualizerIndicatorView
may be used in storyboards, and fully supports AutoLayout. Add a plain UIView first, then set the view's Class and Module to EqualizerIndicatorView
.
This version requires Xcode 9.0 and Swift 4.
EqualizerIndicatorView
supports iOS 9.0+ and tvOS 9.0+. Also supports Swift 3 and Xcode 8.0.
Created by Alex Givens in California.
The MIT License (MIT)
Copyright (c) 2017 Alex Givens http://alexgivens.com