alfianlosari / SiriWaveView

SwiftUI implementation of iOS9+ Siri waveform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftUI Siri Waveform

iOS9+ style customizable Siri waveform in SwiftUI

alt text

Overview

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.

Installation

Swift Package Manager

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

Usage

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

Original Author

Noah Chalifour, chalifournoah@gmail.com

License

SwiftUI-SiriWaveView is available under the MIT license. See the LICENSE file for more info.

About

SwiftUI implementation of iOS9+ Siri waveform

License:MIT License


Languages

Language:Swift 100.0%