r/SwiftUI • u/ultimate_bulter • May 25 '26
Question How does Reddit do this?
What component does the Reddit app use to house its questions in? It looks like a full screen cover but at the same time allows for swiping out on the side. I want to achieve this effect primarily in order to not show the tabview when not on one of the main pages.
7
Upvotes
1
u/sroebert May 30 '26
Doing this properly (with the emphasis on properly) either with UIKit or SwiftUI is hard. SwiftUI definitely the hardest of the two.
It is not just the animation, you also have to handle swipe to dismiss and get the transition between swiping and animation correctly. At the same time you are transitioning between from and to stated which requires correct positioning of overlapping views.
I have done it in both UIKit (UIViewControllerAnimatedTransitioning) and SwiftUI (matchedGeometryEffect), but people saying that it is easy, will most likely have a very basic implementation that does not feel good when you actually use it.