I've been searching for a solution for this since yesterday. Everything I could find was suggested 4-5 iOS versions ago, and seems to not work anymore. I was wondering if anyone has a new, working idea?
Adding the two different suggestions I found:
func popViewController(animated: Bool, completion: @escaping () -> Void) {
popViewController(animated: animated)
if animated, let coordinator = transitionCoordinator {
coordinator.animate(alongsideTransition: nil) { _ in
completion()
}
} else {
completion()
}
}
And
func popViewControllerWithHandler(completion: ()->()) {
CATransaction.begin()
CATransaction.setCompletionBlock(completion)
self.popViewControllerAnimated(true)
CATransaction.commit()
}
What's the reason UIKit
doesn't offer it? So weird