Skip to content

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

License

Notifications You must be signed in to change notification settings

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.

Releases

No releases published

Packages

No packages published

Languages