I just watched the "Customize and resize sheets in UIKit" session and would like to know if/when the functionality in that session will be exposed in SwiftUI.
Also, can we have customizable detent sizing? Based on content ideal height?
Thanks!
I just watched the "Customize and resize sheets in UIKit" session and would like to know if/when the functionality in that session will be exposed in SwiftUI.
Also, can we have customizable detent sizing? Based on content ideal height?
Thanks!
There is not a SwiftUI API for sheet detents. If you want to use sheet detents from SwiftUI, you can use UIViewControllerRepresentable to get a handle to a UIViewController instance, which you can call presentViewController on.
There is not a way to add custom detents or specify a specific sheet height with UISheetPresentationController. If the system medium detent isn't sufficient for your use case, you may need to continue to use your own card/sheet implementation.
@Frameworks Engineer wrote:
If the system medium detent isn't sufficient for your use case, you may need to continue to use your own card/sheet implementation. < < <
Problem is, the .sheet modifier doesn't give you the medium detent. It only gives the large detent. (Always covers the whole screen.)
Apple... if you're listening... please add more flexibility to these SwiftUI APIs. Like... why are you adding functionality that's only available to UIKit? Are you deliberately trying to make adoption go as slow as possible while we reinvent every wheel?