Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork67
A slideout navigation control for Xamarin.iOS
License
Baseflow/Xamarin-Sidebar
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A slideout navigation control for Xamarin iOS applications.
Get the package onNuget!
If you're using Sidebar Navigation send me a link to your app and I'll happily post it here.
This is partly based on two other good slideout menu implementation that each didn'tprovide quite what I was looking for. Those two areFlyoutNavigationandSlideoutNavigation.
Xamarin-Sidebar allows you to provide one UIViewController to be used as a content viewand another to be used as a menu. When you open the menu the content view will slide overto reveal the provided menu UIViewController.
To set it up just create a root UIViewController and a SidebarController, passing in yourcontent and menu controllers.
RootViewController.cs
usingSidebarNavigation;...public partialclassRootViewController:UIViewController{// the sidebar controller for the apppublicSidebarControllerSidebarController{get;privateset;}publicoverridevoidViewDidLoad(){base.ViewDidLoad();// create a slideout navigation controller with the top navigation controller and the menu view controllerSidebarController=newSidebarController(this,newContentController(),newSideMenuController());}}...
AppDelegate.cs
...public overrideboolFinishedLaunching(UIApplicationapp,NSDictionaryoptions){window=newUIWindow(UIScreen.MainScreen.Bounds);// set our root view controller with the sidebar menu as the apps root view controllerwindow.RootViewController=newRootViewController();window.MakeKeyAndVisible();returntrue;}...
In the content controller you can add a button to open the slideout menu.
menuButton.TouchUpInside+=(sender,e)=>{SidebarController.ToggleMenu();};
In the side menu controller you can add buttons to change the content view.
otherContentButton.TouchUpInside+=(sender,e)=>{SidebarController.ChangeContentView(newOtherContentController());};
Additional options include hiding the shadow, setting the menu width, and placing the menuon the left.
SidebarController.HasShadowing=false;SidebarController.MenuWidth=220;SidebarController.MenuLocation=SidebarController.MenuLocations.Left;
See the sample projects included in the source for more details.
About
A slideout navigation control for Xamarin.iOS
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.
