SWRevealViewController icon indicating copy to clipboard operation
SWRevealViewController copied to clipboard

Push view controller from app delegate with navigation controller

Open quetool opened this issue 8 years ago • 3 comments

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];

quetool avatar Jun 04 '16 00:06 quetool

self.window.rootViewController is a SWRevealViewController!

iDevelopper avatar Jun 04 '16 04:06 iDevelopper

yes, thanks! we continue from here https://github.com/John-Lluch/SWRevealViewController/issues/584

quetool avatar Jun 04 '16 17:06 quetool

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];

shruezee avatar Oct 01 '19 00:10 shruezee