How do I dismiss a particular view controller in iOS?
From iOS 13.0 onwards, whenever you present a UIViewController you get a card-like user interface where the new view controller can be dismissed by swiping downwards.
How to dismiss popup in Swift?
The first option is to tell the view to dismiss itself using its presentation mode environment key. Any view can dismiss itself, regardless of how it was presented, using @Environment(\. dismiss) , and calling that property as a function will cause the view to be dismissed.