PartialSheet | SwiftUI Partial Sheet fully customizable with dynamic height | iOS library
kandi X-RAY | PartialSheet Summary
kandi X-RAY | PartialSheet Summary
A custom SwiftUI modifier to present a Partial Modal Sheet based on his content size.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PartialSheet
PartialSheet Key Features
PartialSheet Examples and Code Snippets
Community Discussions
Trending Discussions on PartialSheet
QUESTION
I'm looking for a way of observing @State
or @Binding
value changes in onReceive
. I can't make it work, and I suspect it's not possible, but maybe there's a way of transforming them to Publisher
or something while at the same time keeping the source updating value as it's doing right now?
Below you can find some context why I need this:
I have a parent view which is supposed to display half modal based on this library: https://github.com/AndreaMiotto/PartialSheet
For this purpose, I've created a @State private var modalPresented: Bool = false
and I'm using it to show and hide this modal view. This works fine, but my parent initializes this modal immediately after initializing self, so I completely loose the onAppear
and onDisappear
modifiers. The problem is that I need onAppear
to perform some data fetching every time this modal is being presented (ideally I'd also cancel network task when modal is being dismissed).
ANSWER
Answered 2020-Mar-17 at 14:33use ObservableObject / ObservedObject instead.
an example
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PartialSheet
iOS 15.0+ / macOS 12.0+
Xcode 13+
Swift 5+
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page