iOS9+ style customizable Siri waveform in SwiftUI
This repository is a fork from the now-archived swiftui-siri-waveform-view repository. This version exposes the view as an SPM Library, making it easily integratable into modern SwiftUI projects.
This implementation provides a simple way to create the Siri waveform seen in iOS9+ using SwiftUI. The mathematical foundation for the waveform is based on an excellent article, found here, which explains the concepts and demonstrates building a Siri waveform in JavaScript.
Swift Package Manager
File > Swift Packages > Add Package Dependency - Add https://github.com/muskan09/SiriWaveView
import SiriWaveView
struct MyView: View {
@State var power: Double = 0.0
var body: some View {
VStack {
SiriWaveView()
.power(power)
}
}
}
Anytime the power
state variable is updated, the wave will animate automatically.
Noah Chalifour, [email protected]
SwiftUI-SiriWaveView is available under the MIT license. See the LICENSE file for more info.
Let me know if you need any further changes or additions.