CircularReveal

1.0.1

CircularReveal is a SwiftUI modifier that allows presenting views with a circular animation
terlan98/CircularReveal

What's New

2024-01-05T18:20:38Z
  • Added a demo GIF

CircularReveal

ios swiftui spm license

A SwiftUI package for presenting views with a circular animation.

📦 Features

  • Trigger with a boolean or an arbitrary item
  • Set custom animation duration
  • Execute a closure when the presented view is dismissed

🛠 Installation

You can install CircularReveal by going to your Project settings > Swift Packages and add the repository by providing the GitHub URL. Alternatively, you can go to File > Swift Packages > Add Package Dependencies...

🚀 Usage

Example

struct FirstView: View {
    @State private var isRevealed = false

    var body: some View {
        VStack {
            Text("This is the first view")

            Button("Present Second View") {
                isRevealed = true
            }
        }
        .circularReveal(isRevealed: $isRevealed) {
            SecondView(isRevealed: $isRevealed)
        }
    }
}
struct SecondView: View {
    @Binding var isRevealed: Bool

    var body: some View {
        VStack {
            Text("This is the second view")
  
            Button("Dismiss Second View") {
                isRevealed = false
            }
        }
    }
}

For more examples, check out the Examples folder

🤝 Contribution

I highly appreciate and welcome any issue reports, feature requests, pull requests, or GitHub stars you may provide.

License

CircularReveal is released under the MIT license.

Buy Me A Coffee

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Oct 19 2024 08:14:18 GMT-0900 (Hawaii-Aleutian Daylight Time)