I've set up my app using the SWRevealViewController and it's working fine but I want to change how it works. At the moment I have the following views on the same level:
But I want:
I still want Home, View A, View B to be in the menu but when clicking on View A or View B it gets pushed onto Home. And in the navigation bar it has a back button instead of the menu button.
Is this possible using SWRevealViewController?
in objective-C
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
SWRevealViewController *main = (SWRevealViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:@"SWRevealViewController"];
[self presentViewController:main animated:YES completion:nil];
in swift -- it automatically open the your root view controller of SWL
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let main = storyboard.instantiateViewControllerWithIdentifier("SWRevealViewController") as! UIViewController //SWRevealViewController
self.presentViewController(main, animated: true, completion: nil)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With