Skip to content

Appear animation transition View for SwiftUI πŸš€

License

Notifications You must be signed in to change notification settings

stonko1994/DelayedTransitionView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DelayedTransitionView

Appear animation transition View for SwiftUI


Installation

Swift Package Manager is a tool for managing the distribution of Swift frameworks. It integrates with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

Using Xcode

To integrate using Xcode 13, open your Project file and specify it in Project > Package Dependencies using the following URL:

https://github.com/stonko1994/DelayedTransitionView.git

Usage

import DelayedTransitionView

Add a DelayedTransitionView to your view. This view acts as container view for all views that should be animated.

DelayedTransitionView {
    ...
}

The DelayedTransitionView takes additional configuration properties. (See code documentation for details)

Use the .delayedPresentation(viewIndex: x) view modifier to specify which views should be animated.

DelayedTransitionView {
    VStack {
        Spacer()
        Text("First view")
            .delayedPresentation(viewIndex: 0)
        Spacer()
        Text("Second view")
            .delayedPresentation(viewIndex: 1)
        Spacer()
        Text("Third view")
            .delayedPresentation(viewIndex: 2)
        Spacer()
    }
}

In this example only the Text views will appear be animated.

For more control over the individual animations, checkout the additional configuration properties. (See code documentation for details) It is possible to use the same viewIndex for multiple views if they should appear at the same time. Also it does not need to start with 0

Example


Buy Me A Coffee

About

Appear animation transition View for SwiftUI πŸš€

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages