Hi,
I successfully implemented SideDrawer and customized it to my liking. When I present a ViewController from my Home ViewController, which defined the SideDrawer, it replaces the current view with the drawer and everything, which is an expected behavior with PresentViewController. What is the proper protocol to preserve the SideDrawer throughout the app? Or presenting a view controller in such a way that this does not happen?
Thanks
5 Answers, 1 is accepted
Thanks for writing. You are probably referring to using a UINavigationController with a SideDrawer?:
http://docs.telerik.com/devtools/ios/sidedrawer/sidedrawer-with-uinavigationcontroller
Regards,
Deyan
Telerik by Progress
Hi,
Thanks for the response, I saw that, but I am just trying to present a new view controller depending on which menu item was tapped, from the DidSelectItem. If I do PresentViewController, the view controller appears, but the menu is not retained anymore. How do I solve this and retain the menu in the new view?
Thanks for writing back.
This should be the solution to your case. By using a root UINavigationController which defines a SideDrawer as described in the article I've shared. In this way you will define the Menu contents once and reuse them thanks to the fact that your root view controller defines a SideDrawer.
Does this not help?
Regards,
Deyan
Telerik by Progress
Hi,
So the documentation you linked doesn't define a UINavigationController in it. So I assume I do something like:
1.
SideDrawerGettingStarted main =
new
SideDrawerGettingStarted ();
2.
UINavigationCongtoller navigationController =
new
UINavigationController(main);
3.
TKSideDrawerController sideDrawerController =
new
TKSideDrawerController (navigationController);
4.
this
.Window.RootViewController = sideDrawerController;
This keeps the side drawer throughout the app, but now my custom UINavigationBar with the menu button gets overridden by the UINavigationControllers, even the example in the page you linked me, the UINavigationBar defined is overridden. So I am still a bit confused. Thanks for all the help so far!
Figured out there is a method to hide the UINavigationControllers navigation bar:
this
.NavigationController.SetNavigationBarHidden(
true
,
false
);