John-Lluch / SWRevealViewController

A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right !
Other
4.52k stars 987 forks source link

Push view controller from app delegate with navigation controller #588

Open quetool opened 8 years ago

quetool commented 8 years ago

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

iDevelopper commented 8 years ago

self.window.rootViewController is a SWRevealViewController!

quetool commented 8 years ago

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

shruezee commented 5 years ago

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