LeoNatan / LNPopupUI

A SwiftUI library for presenting views as popups, much like the Apple Music and Podcasts apps.
MIT License
320 stars 29 forks source link

Popover's background Scale Effect #30

Closed Treata11 closed 8 months ago

Treata11 commented 8 months ago

In standard modalViews of SwiftUI like .sheet & .popover, You'll notice that when the modal view is presented the view behind kind of scales down & moves outwards ... It's just a nice pre-canned touch only for .sheet & .popover provided by apple with probably their own private APIs.

I wanted to know if it is deployable to the project to add to it's sweetness?

RPReplay_Final1704230334

I think apple had used a simple .fullScreenCover for the popup action ... but they also have included this touch to it which isn't seen in a standard fullScreenCover in SwiftUI

LeoNatan commented 8 months ago

Unfortunately, this is not possible right now. The underlying UIKit framework, LNPopupController, has existed far longer than sheet presentation has existed in UIKit. It does not use UIViewController presentation, which is the only way to achieve this. Over the years, I have considered how to implement this, but every solution has been far too complex—basically requiring the complete rewrite of that framework.

I will close this issue for now, as there is nothing planned, but will update in case something is implemented eventually.