Swiftpack.co - tyagishi/FlipAnimationView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by tyagishi.
tyagishi/FlipAnimationView 3.0.0
FlipAnimationView
⭐️ 1
🕓 23 weeks ago
iOS macOS
.package(url: "https://github.com/tyagishi/FlipAnimationView.git", from: "3.0.0")

FlipAnimationView

macOS iOS iOS macOS SPM is supported license

Feature

Flip animation for showing numbers

in 30sec

in30Sec

Code Example

//
//  ContentView.swift
//
//  Created by : Tomoaki Yagishita on 2021/11/20
//  © 2021  SmallDeskSoftware
//

import SwiftUI
import FlipAnimationView

struct ContentView: View {
    @StateObject var viewModel: FlipViewModel = FlipViewModel(0, range: 0...6)
    @StateObject var twoDigitsViewModel: FlipViewModel = FlipViewModel(0, range: 0...21)
    @StateObject var clockViewModel: ClockViewModel = ClockViewModel()
    var body: some View {
        VStack {
            SingleFlipView(viewModel.value.firstDigit, viewModel.prevIndex(viewModel.value).firstDigit, viewModel, duration: 0.3)
                .onTapGesture {
                    _ = viewModel.incrementIndex()
                }
            TwoDigitFlipView(twoDigitsViewModel, duration: 1.0)
                .onTapGesture {
                    _ = twoDigitsViewModel.incrementIndex()
                }
            DigitalClockView(clockViewModel)
        }
        .padding()
    }
}

Installation

Swift Package Manager: https://github.com/tyagishi/FlipAnimationView

Requirements

none

Note

comments/feedback are really appreciated.

GitHub

link
Stars: 1
Last commit: 23 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

3.0.0
23 weeks ago

add second display option(noShow,half,normal)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics