You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my parent view controller, I've defined the following:
whatsNew.onDismissal = didDismissWhatsNew
But the closure only executes when the user clicks on the "continue" button at the bottom of the WhatsNew vc. It does not execute when the user dismisses the page sheet by swiping downward.
I'm no professional, but until someone figures out a generalized solution, I figured I'd share what I did to get around this.
Manual workaround:
First I modify my parent view controller to adhere to the UIAdaptivePresentationControllerDelegate protocol:
class PlannerViewController: UIViewController, UIAdaptivePresentationControllerDelegate {
Then in the parent vc's function where I initialize the WhatsNew vc, prior to calling whatsNew.presentIfNeeded(on: self), I set "self" as the presentationController delegate:
whatsNew.presentationController?.delegate = self
Lastly, in the parent VC, I implement the presentationControllerDidDismiss(_:) method and call the same dismissal action that I defined for whatsNew.onDismissal:
In my parent view controller, I've defined the following:
whatsNew.onDismissal = didDismissWhatsNew
But the closure only executes when the user clicks on the "continue" button at the bottom of the WhatsNew vc. It does not execute when the user dismisses the page sheet by swiping downward.
I'm no professional, but until someone figures out a generalized solution, I figured I'd share what I did to get around this.
Manual workaround:
First I modify my parent view controller to adhere to the UIAdaptivePresentationControllerDelegate protocol:
class PlannerViewController: UIViewController, UIAdaptivePresentationControllerDelegate {
Then in the parent vc's function where I initialize the WhatsNew vc, prior to calling
whatsNew.presentIfNeeded(on: self)
, I set "self" as the presentationController delegate:whatsNew.presentationController?.delegate = self
Lastly, in the parent VC, I implement the
presentationControllerDidDismiss(_:)
method and call the same dismissal action that I defined forwhatsNew.onDismissal
:The text was updated successfully, but these errors were encountered: