I am working on iPhone application using Objective C. As I need to dismiss two UIViewControllers at once, so I am using below code :
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
This code is working fine in iOS6 and iOS7, but it is not working in iOS8. I have checked by using breakpoint, my ViewController viewDidLoad and viewWillAppear method is calling but my view is not loading at all, so as an output, I am getting blank white screen. Can anyone please help me that for iOS8, how can I solve this problem, should I need to use presentedViewController instead of presentingViewController?
Try following:
Hope this helps.
Swift code
Sample project
Objective-c code
Sample project