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 1.0.1
FlipAnimationView
⭐️ 0
🕓 1 week ago
iOS macOS
.package(url: "https://github.com/tyagishi/FlipAnimationView.git", from: "1.0.1")

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: 0
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

add readme, license
1 week ago

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