SWRevealViewController
SWRevealViewController copied to clipboard
Push view controller from app delegate with navigation controller
Hi, i want to push a view controller with rootNavigationController from app delegate but i get an error
[SWRevealViewController pushViewController:animated:]: unrecognized selector sent to instance 0x13f08b200
This is what i do:
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController; MyViewController *controller = (MyViewController *)[storyboard instantiateViewControllerWithIdentifier:@"MyViewController"]; [navigationController pushViewController:controller animated:YES];
self.window.rootViewController is a SWRevealViewController!
yes, thanks! we continue from here https://github.com/John-Lluch/SWRevealViewController/issues/584
if anyone have issues with ios 13 using present vc or push vc, following way solves. CustomViewController* c_vc = [[CustpmViewController alloc] init]; if (@available(iOS 13.0, *)) { login_vc.modalPresentationStyle = UIModalPresentationFullScreen; } [self presentViewController:c_vc animated:YES completion:nil];