In my app I have an ECSlidingViewController
declared as initial root controller via Storyboard
. In my AppDelegate's didFinishLaunchingWithOptions
method, I instantiate it as above:
self.slidingController = [[UIStoryboard storyboardWithName:@"AppStoryboard" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"ECSlidingViewController"];
What I want is to be able to show a global modal view controller (eg. when a push notification arrives while the app is active) without knowing which controller is currently top in the sliding controller.
What I do is (in my AppDelegate):
[self.slidingController.topViewController presentModalViewController:controller animated:YES];
but it doesn't seem to work.
Is there any way I could present a modal controller from my sliding controller regardless which controller is topViewController?
PS. If no, is there any chance that what I want will work with SWRevealViewController
instead of ECSlidingViewController
? If it's worth, I will take the painful road to switch.
Thank you in advance!