I'm trying to dismiss a view controller like this:
[composeViewController dismissViewControllerAnimated:YES completion:^{
NSLog(@"Hello"); // Never outputted
}];
The view controller is dismissed, but for some reason the completion block is never called.
I have never had any issues with completion block not being called with other view controllers.
This view controller is "special" though, because it's added as a child view controller (which I have not worked with previously in my app). Does this impose any side effects why the completion block is not called?
It's added like this:
UIViewController *rootVC = [UIApplication sharedApplication].delegate.window.rootViewController;
[rootVC addChildViewController:self];
[rootVC.view addSubview:self.view];
[self didMoveToParentViewController:rootVC];
Found out what the issue was: the 3rd party view controller I was using had overridden - (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion
without actually calling completion()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With