I have a project that is making use of https://github.com/Orderella/PopupDialog for popup dialogs which works very well.
A dialog is created an presenting like:
let ratingVC = PopupViewController(nibName: "PopupViewController", bundle: nil)
ratingVC.apiKey = self.apiKey
ratingVC.accountNumberString = accountNumberString
let popup = PopupDialog(viewController: ratingVC, buttonAlignment: .horizontal, transitionStyle: .bounceDown, gestureDismissal: true)
ratingVC.presentedPopup = popup
self.present(popup, animated: true, completion: nil)
Which allows for custom view controller work within the popup. Within the PopupViewController
the PopupDialog might get dismissed using self.dismiss(animated: true)
This works well however I'm not sure how the launching view controller (where self.present is run) would get notified that the PopupDialog has been dismissed.
I have tried
override func dismiss(animated flag: Bool, completion: (() -> Void)?)
{
super.dismiss(animated: flag, completion:completion)
}
In the launching view controller but this doesn't get called.