Skip to content

bullinnyc/PopTransition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PopTransition

Track and perform action by doing interactive swipe transition or back button press for SwiftUI.

Usage

struct MyView: View {
    var body: some View {
        ZStack {
            // ...
        }
        .onPopTransition { transitionState in
            switch transitionState {
            case .start(let type):
                print("Start transition with: \(type)")
            case .finish(let type):
                print("Finish transition with: \(type)")
            case .interactiveSwipeChange:
                print("Finger lifted up or moved back to left edge.")
            case .interactiveSwipeCancel:
                print("Interactive swipe transition cancel.")
            }
        }
    }
}

Requirements

License

  • PopTransition is distributed under the MIT License.

About

Track and perform action by doing interactive swipe transition or back button press for SwiftUI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages