iOS9+ style customizable Siri waveform in SwiftUI
This repo is a fork from swiftui-siri-waveform-view repo which is now a public archive. This repo exposes the view as SPM Lib so it ca be easily integrated in modern SwiftUI projects.
This is a very simple implementation of the Siri waveform in iOS9+ made with SwiftUI. The math behind the waveform is based on a great article which can be found here that explains the math and builds a Siri waveform in Javascript.
Swift Package Manager
File > Swift Packages > Add Package Dependency Add - Add https://github.com/alfianlosari/SiriWaveView.git
import SiriWaveView
struct MyView: View {
@state var power: Double = 0.0
var body: some View {
VStack {
SiriWaveView()
.power(power)
}
}
}
Anytime the var power state is updated, the wave will animate automatically
Noah Chalifour, chalifournoah@gmail.com
SwiftUI-SiriWaveView is available under the MIT license. See the LICENSE file for more info.