/SiriWaveView

SwiftUI implementation of iOS9+ Siri waveform

Primary LanguageSwiftMIT LicenseMIT

SwiftUI Siri Waveform

iOS9+ style customizable Siri waveform in SwiftUI

Overview

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.

Installation

Swift Package Manager

File > Swift Packages > Add Package Dependency - Add https://github.com/muskan09/SiriWaveView

Usage

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.

Original Author

Noah Chalifour, chalifournoah@gmail.com

License

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.