Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terlan98/circularreveal
CircularReveal is a SwiftUI modifier that allows presenting views with a circular animation
https://github.com/terlan98/circularreveal
animation circular ios present reveal round swift swiftui view
Last synced: about 1 month ago
JSON representation
CircularReveal is a SwiftUI modifier that allows presenting views with a circular animation
- Host: GitHub
- URL: https://github.com/terlan98/circularreveal
- Owner: terlan98
- License: mit
- Created: 2023-12-03T17:54:28.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-05T18:19:55.000Z (11 months ago)
- Last Synced: 2024-10-14T19:40:19.303Z (about 1 month ago)
- Topics: animation, circular, ios, present, reveal, round, swift, swiftui, view
- Language: Swift
- Homepage:
- Size: 774 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# CircularReveal
![ios](https://img.shields.io/badge/Platforms-iOS_16+-lightgray?style=for-the-badge&logo=apple)
![swiftui](https://img.shields.io/badge/MADE_WITH-SWIFTUI-0097FE?style=for-the-badge)
![spm](https://img.shields.io/badge/SwiftPM-compatible-brightgreen?style=for-the-badge&logo=swift)
![license](https://img.shields.io/github/license/terlan98/CircularSlider?style=for-the-badge)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```swift
struct FirstView: View {
@State private var isRevealed = falsevar body: some View {
VStack {
Text("This is the first view")Button("Present Second View") {
isRevealed = true
}
}
.circularReveal(isRevealed: $isRevealed) {
SecondView(isRevealed: $isRevealed)
}
}
}
``````swift
struct SecondView: View {
@Binding var isRevealed: Boolvar body: some View {
VStack {
Text("This is the second view")
Button("Dismiss Second View") {
isRevealed = false
}
}
}
}
```For more examples, check out the [Examples](https://github.com/terlan98/CircularReveal/tree/main/Sources/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.