Deepak Sharma
Deepak Sharma

Reputation: 6477

UINavigationController swipe down gesture detect

UINavigationController presented modally as form sheet can be swiped down to dismiss. This gesture is native in iOS and not mine. The problem is on iOS 13, it does not trigger viewWillAppear in the parent view controller after it gets dismissed. So I need a way to know the view controller is getting dismissed or got dismissed by a system gesture. How do I detect dismissal of view controller in that case?

Upvotes: 2

Views: 2839

Answers (1)

SwiftArtery
SwiftArtery

Reputation: 286

Looks like UIAdaptivePresentationControllerDelegate might be what you're looking for, specifically the 4 new instance methods. Some more info here.

Upvotes: 6

Related Questions