Giter Club home page Giter Club logo

xamarin-sidebar's Introduction

Xamarin-Sidebar

A slideout navigation control for Xamarin iOS applications.

license Build status NuGet GitHub tag MyGet

Get the package on Nuget!

If you're using Sidebar Navigation send me a link to your app and I'll happily post it here.

Menu Open

This is partly based on two other good slideout menu implementation that each didn't provide quite what I was looking for. Those two are FlyoutNavigation and SlideoutNavigation.

Xamarin-Sidebar allows you to provide one UIViewController to be used as a content view and another to be used as a menu. When you open the menu the content view will slide over to reveal the provided menu UIViewController.

To set it up just create a root UIViewController and a SidebarController, passing in your content and menu controllers.

RootViewController.cs

using SidebarNavigation;
...
public partial class RootViewController : UIViewController
{
	// the sidebar controller for the app
	public SidebarController SidebarController { get; private set; }

	public override void ViewDidLoad()
	{
		base.ViewDidLoad();

		// create a slideout navigation controller with the top navigation controller and the menu view controller
		SidebarController = new SidebarController(this, new ContentController(), new SideMenuController());
	}
}
...

AppDelegate.cs

...
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
	window = new UIWindow(UIScreen.MainScreen.Bounds);
	
	// set our root view controller with the sidebar menu as the apps root view controller
	window.RootViewController = new RootViewController();
	
	window.MakeKeyAndVisible();
	return true;
}
...

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(new OtherContentController());
};

Additional options include hiding the shadow, setting the menu width, and placing the menu on the left.

SidebarController.HasShadowing = false;
SidebarController.MenuWidth = 220;
SidebarController.MenuLocation = SidebarController.MenuLocations.Left;

See the sample projects included in the source for more details.

xamarin-sidebar's People

Contributors

aloisdeniel avatar bdrelling avatar darthramone avatar denniswelu avatar eltehupkes avatar jdehlin avatar jj09 avatar kruzty avatar martijn00 avatar mvanbeusekom avatar nmilcoff avatar psychowood avatar travisrussi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin-sidebar's Issues

Hide sidebar completely for custom animation segues

Hi Jack,

I have your menu throughout my app, on some pages I have to use PushViewController to display a new UIViewController for one reason or another, my issue is that when I do anything but the standard animation I see the menu in the animation, just a glimpse of it, but it makes the transition look bad. My code is below, this should help you re-create the issue.

`static public void AnimatePushController(UINavigationController NavCon, BaseController DestinationViewController)
{
CATransition transition = new CATransition()
{
Duration = 0.35,
TimingFunction = CAMediaTimingFunction.FromName(CAMediaTimingFunction.EaseOut),
Type = CAAnimation.TransitionPush,
Subtype = CAAnimation.TransitionFromRight
};

        NavCon.View.Layer.AddAnimation(transition, CALayer.Transition);
        NavCon.PushViewController(DestinationViewController, false);
    }`

I tried setting the menu width to 0 or disabling it before the transition, what we really need is a hide or hidden state if possible.

I know I keep saying it, but great control!

Many thanks,

Conrad

System.MissingMethodException at RootViewController.cs

Hi,

The Unified sample project works but when I copied all the files from sample by one by one into my project and implemented it the same way as is in the sample project it throws an exception at RootViewController.cs:ViewDidLoad

in line:
SidebarController = new SidebarNavigation.SidebarController(this, NavController, new SideMenuController());

This is the exception:
System.MissingMethodException: Method not found: 'UIKit.UIGestureRecognizer.set_Delegate'. at SidebarNavigation.SidebarController.Initialize (UIKit.UIViewController currentViewController, UIKit.UIViewController navigationViewController) [0x00000] in <filename unknown>:0 at SidebarNavigation.SidebarController..ctor (UIKit.UIViewController rootViewController, UIKit.UIViewController contentAreaController, UIKit.UIViewController navigationAreaController) [0x00000] in <filename unknown>:0

Swipe Gesture BUG

I use the menú and works perfectly but if i try add gesture swipe in a subview in the center ViewController (contentAreaController) this gesture doesn´t work, but if I create a view controller without this menu works correctly.

Slide only seems to work for the top half

Hey,

Firstly thanks for this, this is great!

I've noticed a small issue though, the swipe gesture only seems to work on the top half of the view, the bottom half doesn't work (although I've not had a chance to try it on a iPhone device yet, so it could be a simulator bug)

Any idea how to fix this (assuming it's not a simulator bug?)

Thanks

Back to Root Controller not working.

when call PopToRootViewController() method from NavController not working. NavController inherited from UINavigationController.

Plist.RemoveObject("jsonLogin"); NavController.PopToRootViewController(true);

Problem with X alignment

I have used it with XIBs exactly as your example but I get misplace the X alignment even for the navigation bar. See screenshot.

I use auto layout and size classes. But it doesn't make a difference if I turn it off.

Any thoughts?
ios simulator screen shot feb 20 2015 23 24 32

Content view resizes incorrectly

I am testing the component in different ios emulators and resizes just fine in iphone5 and iphone6. The problem lies in iphone 4s. The content screen is smaller than the device screen.

Content in wrong size

I am using this component in a webview app, and when test it on iPhone simulator 6 and below the content is too big for the screen, and when i test it on iPhone simulator 6 plus and above the content don't fill the screen.

How can i fix this?

Need help with sidebar menu.

Hi i'm currently trying to use the sidebar menu with my project but i cannot get it to work correctly work how i need to.

what im trying to do is have it so when u click to open the sidemenu it shows a list on static tableview cells and on a cell click open to a new view/table view.
in xamarin you need a navigation controller to be the initial view controller in order to get it to work correctly (as seem in pic below) Is there anyway around this or a fix for the sidebar?
image

Problem with NavigationController as RootViewController

Hi,
My project have a NavigationBarController without storyboard. The NavigationBar have 2 viewcontrollers and I want add sidebar in one. I don't get the project shows the sidebar correctly.

CODE

public partial class AppDelegate : UIApplicationDelegate
{
    // class-level declarations
    UIWindow window;
    UINavigationController nc;
    UIViewController view;

    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        // create a new window instance based on the screen size
        window = new UIWindow (UIScreen.MainScreen.Bounds);
        nc = new UINavigationController ();
        view = new ViewController1 ();

        nc.PushViewController (view, false);
        nc.NavigationBar.Translucent = false;
        window.RootViewController = nc;

        // make the window visible
        window.MakeKeyAndVisible ();

        return true;
    }


public class ViewController1 : UIViewController
{
    public ViewController1 ()
    {
    }

    public override void ViewDidLoad ()
    {
        base.ViewDidLoad ();

        View.BackgroundColor = UIColor.Red;

        var title = new UILabel(new RectangleF(0, 50, 320, 30));
        title.Font = UIFont.SystemFontOfSize(24.0f);
        title.TextAlignment = UITextAlignment.Center;
        title.TextColor = UIColor.White;
        title.Text = "UIViewController1";

        var body = new UILabel(new RectangleF(50, 120, 220, 100));
        body.Font = UIFont.SystemFontOfSize(12.0f);
        body.TextAlignment = UITextAlignment.Center;
        body.Lines = 0;
        body.Text = @"This is the content view controller.";

        var menuButton = new UIButton(UIButtonType.System);
        menuButton.Frame = new RectangleF(50, 250, 220, 30);
        menuButton.SetTitle("Toggle Side Menu", UIControlState.Normal);
        menuButton.TouchUpInside += (sender, e) => {
            this.NavigationController.PushViewController(new ViewController2(), true);
        };

        View.Add(title);
        View.Add(body);
        View.Add(menuButton);
    }
}


public class ViewController2 : UIViewController
{
    SidebarController sidebar;

    public ViewController2 ()
    {
    }

    public override void ViewDidLoad ()
    {
        base.ViewDidLoad ();

        View.BackgroundColor = UIColor.Blue;

        var title = new UILabel(new RectangleF(0, 50, 320, 30));
        title.Font = UIFont.SystemFontOfSize(24.0f);
        title.TextAlignment = UITextAlignment.Center;
        title.TextColor = UIColor.White;
        title.Text = "UIViewController2S";

        var body = new UILabel(new RectangleF(50, 120, 220, 100));
        body.Font = UIFont.SystemFontOfSize(12.0f);
        body.TextAlignment = UITextAlignment.Center;
        body.Lines = 0;
        body.Text = @"This is the content view controller.";

        var menuButton = new UIButton(UIButtonType.System);
        menuButton.Frame = new RectangleF(50, 250, 220, 30);
        menuButton.SetTitle("Toggle Side Menu", UIControlState.Normal);
        menuButton.TouchUpInside += (sender, e) => {
            sidebar.ToggleMenu();
        };

        View.Add(title);
        View.Add(body);
        View.Add (menuButton);

        sidebar = new SidebarController(this.NavigationController, this, new SideMenuController());
        sidebar.MenuLocation = SidebarController.MenuLocations.Right;
    }
}

Shadow disappears before closing

Hi!
I've noticed that side shadow disappears before closing menu animation ends.
It happens on both sides.

I've fixed it with this implementation of CloseMenu in Sidebar.cs


        public void CloseMenu(bool animate = true)
        {
            if (!IsOpen || Disabled)
                return;
            MenuViewController.View.EndEditing(true);

            UIView.AnimateNotify(animate ? Sidebar.SlideSpeed : 0,
                0,
                UIViewAnimationOptions.CurveEaseInOut,
                () =>
                {
                    _sidebarContentArea.CloseAnimation();
                    _sidebarContentArea.AfterCloseAnimation(TapGesture);
                    IsOpen = false;
                },
                (finished) =>
                {
                    if (finished)
                        HideShadow();
                });
}

Basically same as original but used AnimateNotify wrapper to have completion handler

Passing gestures to content view when sidebar is open

Hi,
I am using a ViewController containing a Google Maps view as the content controller to a SidebarController. Whenever the drawer is open, the map becomes non-responsive to any gesture(swipe, tap, pinch). Is there a way to pass the gestures to the content view?

Animations are very slow in iPhone Simulator

Kick ass job on the control, great work jdehlin.

It works fine on a device however when running in the simulator the presence of the sidebar controller makes all transitions and animations very slow. For example when calling:
SidebarController.ChangeContentView(viewcontroller);

The animation/transition executes but very slowly. Again, deployed on a device everything works perfectly.

I am planning on digging into the animations but first wanted to see if someone else has experienced this.

Thanks so much.
Jon

Add sidebar after login

Hi,
I have a storyboard project and in my application I have few screens (Register/login) and after these screens I want Sidebar to be available on the main landing page, so it will not be a rootViewController of the application.

I have a landingPageViewController which will act as a rootViewController and in its viewDidload I am doing following things to setup sidebar controller:

var reservationStepOneController = (ReservationStepOneViewController)Storyboard.InstantiateViewController("reservationOne");
            var menuController = (MenuViewController)Storyboard.InstantiateViewController("menuViewController");

            // create a slideout navigation controller with the top navigation controller and the menu view controller
            this.NavController = new UINavigationController();
            NavController.PushViewController(reservationStepOneController, false);
            SidebarController = new SidebarNavigation.SidebarController(this, this.NavController, menuController);
            SidebarController.MenuWidth = 220;
            SidebarController.ReopenOnRotate = false;
            SidebarController.MenuLocation = SidebarNavigation.SidebarController.MenuLocations.Left;

After this point, I am not able to set left bar button item in the navigation bar neither I can set the title to it. Sidebar is accessible via swiping but not via navigation bar as not able to add items to the navigation bar.
How can I achieve this? Is it mandatory to have sidebar added to the rootController of applicaiton?

Problem using UITabBarController

Using other ViewController as Content is fine but when using a UITabBarController the SideBar appears as second ViewController of the tab.

Temporarily disable sidebar

Hi,

I'm currently using the Sidebar successfully. I followed your easy to use example of StoryBoardSideBar. However, in my app it checks to see if the user is still logged in and if not the navigation controller will push a custom login view controller over whatever controller is currently shown. The login screen shows successfully, but the sidebar menu is still accessible by swiping the screen. The user can then bypass the login and continue.

Is there a way to temporarily disable the sidebar while the login screen is open? If not a temporary fix, is there a way to remove the sidebar while showing the login screen and then create the sidebar again once the user has successfully logged in?

Can I use it with UINavigationController in Storyboard?

I'm trying to use the Sidebar with having all my controllers setup in the Storyboard, but it hangs forever if I have my initial UINavigationController with the RootController inside the Storyboard.

Taking the UINavigationController out and creating with code it will work but this gives me pain with using the MvvmLight NavigationService which is initialized with the UINavigationController initially from the Storyboard.

Problem is when creating the Sidebar.

appD.SideBarController = new SidebarController(this, appD.NavController, leftSideMenuController);

I set the navigation controller at the FinishedLaunching method in the AppDelegate.

Any thoughts?

Multiple storyboards

Hi, Firstly, fantastic control, love it and got it working really easily, however we have decided to implement it throughout our application instead of just on the home screen and I am having issues with a setup of multiple storyboards, will this sidebar work for me? The errors I am receiving are when a segue to a different storyboard to main occurs.

Many thanks.

Conrad

Blank menu content when used with Xamarin Forms

Here's how I am setting up the SideBarController for one of my Xamarin Forms pages (via a renderer):

My Renderer:

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var nativeView = NativeView;
            if (nativeView != null)
            {
                var rootViewController = UIApplication.SharedApplication.KeyWindow.RootViewController;
                Sidebar = new SidebarController(rootViewController, this, new MenuViewController());
            }
        }

When I slide the menu out, it is a blank white view. I've tried other options, like just newing up a view controller and passing that in as the root view controller, but I see the same results. I've tried moving this code to the OnElementChanged method, but still the same problem.

Have you or anyone else had any success when integrating with Xamarin Forms?

iPad support

On iPad I'll end up with a frame on the content that e.g. {X=-220,Y=0,Width=1448,Height=936}

I guess the framework is not supporting iPad? I would be nice with a disclaimer about this :-)

Unable to use an existing Xamarin Form

I noticed that if in the sample for XF you replace (in RootViewController):
NavController.PushViewController(new IntroPage().CreateViewController(), false);
with

var xfPage = (Page)this.Element;
NavController.PushViewController(xfPage.CreateViewController(), false);

you'll get an empty screen.

If the IntroPage uses custom styles (StaticResource), new-ing it will cause a runtime exception.

Cannot use package with Xamarin studio on OSX

Upon attempting to install I am seeing this error:

Attempting to gather dependency information for package 'SidebarNavigation.1.9.0.3' with respect to project 'helloios', targeting '.NETPortable,Version=v4.0,Profile=Profile6'
Attempting to resolve dependencies for package 'SidebarNavigation.1.9.0.3' with DependencyBehavior 'Lowest'
Resolving actions to install package 'SidebarNavigation.1.9.0.3'
Resolved actions to install package 'SidebarNavigation.1.9.0.3'
For adding package 'SidebarNavigation.1.9.0.3' to project 'helloios' that targets 'portable40-net403+win8'.
Install failed. Rolling back...
Package 'SidebarNavigation.1.9.0.3' does not exist in project 'helloios'
Package 'SidebarNavigation.1.9.0.3' does not exist in folder '/Users/kheenan/Projects/helloios/packages'
Could not install package 'SidebarNavigation 1.9.0.3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.0,Profile=Profile6', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I have tried different PCL profiles in the menu. I just get the same error with whatever configurations I have selected.
What am I missing?

App crashes when visiting a BaseController for the second time (when using a storyboard)

Hi,

im using Xamarin-Sidebar for my project in a Storyboard. Everything works fine, except when i'm returning to a BaseController page. The app crashed and gives no feedback in the debugger.

My menu contains 3 buttons that will redirect you to a BaseController page. I will be able to select a page and the selected ViewController is presented. When i change to a different view and then return to a previous visited view the app crashed. Do you have the solution for this issue?

` // DASHBOARD BUTTON
DashboardViewController dashboardViewController = (DashboardViewController)Storyboard.InstantiateViewController("DashboardViewController");

        DashboardButton.TouchUpInside += (o, e) => {
            if (NavController.TopViewController as DashboardViewController == null){
                Console.WriteLine("Redirecting to DashboardViewController");
                NavController.PushViewController(dashboardViewController, false);
            }
            SidebarController.CloseMenu();
        };

        // PROFILE BUTTON
        UserViewController userViewController = (UserViewController)Storyboard.InstantiateViewController("UserViewController");

        ProfileButton.TouchUpInside += (o, e) => {
            if (NavController.TopViewController as UserViewController == null){
                Console.WriteLine("Redirecting to UserViewController");
                NavController.PushViewController(userViewController, false);
            }
            SidebarController.CloseMenu();
        };

        // LESSONS BUTTON
        LessonsViewController lessonsViewController = (LessonsViewController)Storyboard.InstantiateViewController("LessonsViewController");

        LessonsButton.TouchUpInside += (o, e) => {
            if (NavController.TopViewController as LessonsViewController == null){
                Console.WriteLine("Redirecting to LessonsViewController");
                NavController.PushViewController(lessonsViewController, false);
            }
            SidebarController.CloseMenu();
        };`

Navigation bar displaced down on iOS 6.1

When running the NavigationSample project on an iOS 6.1 simulator the navigation bar gets pushed down by 20.0 revealing part of the RootViewController behind it.

Please note the displacement height is the same as the height of the status bar. I'm assuming this has something to do with the new iOS7 ability of placing content behind the status bar.

Please note you must download the iOS6.1 simulator from Xcode in order to test this bug.

Thank you.

Menu when taking a picture with Camera.cs have a bad offset on callback (extra white space)

Here what i found, it's seem that on the callback of the camera in
the ViewWillAppear method of sidebarcontroller, the MenuAreaController.Frame.Width is less than the width of the screen for some reason. So the navigationFrame.X have a bad offset (i use right menu). This only occur in Portrait and taking camera with UIimagePicker.

Note that after taking a picture in portrait and having the extra white space i rotate my phone landscape and rotate it again in portrait the
sidebar fix itself.

img_0008

NavigationItem not displayed in contentcontroller when using storyboard

My project uses the storyboard to create screens, along with NavigationControllers. Everything works fine except the NavigationItem is not displayed in the ContentController....I think I might be missing something really obvious, or do the NavigationControllers get stomped on in the SideBar constructor?

What i'm trying to do is recreate your example where you have a contentcontroller with a navigationbar that slides across to make way for the menucontroller, but I cannot figure out where/how to add the navigationitem to the contentcontroller. If I add it to the rootcontroller the the navigationbar does not move when the menu sldies across

How to use it with Login page

From AppDelegate i need to present LoginPage ,from On Success of Login i need to show Actual content view with slider ,but in provided samples of this component in AppDelete itself rootviewController of side menu has been set as UIWindow root viewController .but how can i show my login page and then move to Content page , need little help, kid in xamarin :(

Touch problem on the side menu

Hello,

I have a problem with the side menu on the iPhone 5. When I open it, the touches are disabled. I can't close the menu with a swipe gesture and the touch events on the menu don't work. I tried with an iPhone 4 (IOS 7) and it works fine.

I can't put my code in here because it's a company project but I did the rootViewController with a controller for the menu and one for the content. The only thought I have is that the rootViewController is launched via a NavigationController and can maybe interfere.

ToggleMenu not working?

Whenever I call SidebarNavigation.SidebarController.ToggleMenu(); the error below shows up:

"An object reference is required to access a non-static member SidebarNavigation.SidebarController.ToggleMenu()"

Set Title to the navigation bar

I'm trying the following sentence to set the title of the navigation bar but is not being shown.

SidebarController.Title = "Some Title";

Where is the mistake?.

Bug in SidebarController.IsOpen

Looks like the code has the sense of the boolean inverted. If I set IsOpen= true, the menu should open, not close.

    public bool IsOpen
    {
        get { return _sidebar.IsOpen; }
        set
        {
            _sidebar.IsOpen = value;
            if (_sidebar.IsOpen)
                CloseMenu();
            else
                OpenMenu();
        }
    }

Also, setting _sidebar.IsOpen prevents the opening. So the code should simply read:

    public bool IsOpen
    {
        get { return _sidebar.IsOpen; }
        set
        {
            if (value)
                _sidebar.OpenMenu();
            else
                _sidebar.CloseMenu();
        }
    }

Is this correct?

Thanks!

Navigation from another ViewModel

MenuView not visible and we called Showviewmodel from another viewmodel like loginviewmodel. But its work perfectly if we called Showviewmodel from Initialize in App.cs

White content after a modal view.

Hi,

I'm trying to show a modal view and all works as expected but when I dismiss the modal view, my main content is completely white.
The left menu work as expected, so with a swipe i can show the left menu.

How can I solve this problem?

EDIT: Sorry, my mistake! It works

[PR] Hide status bar when side menu open

I've spent long hour to modify sidebar navigation to hide status bar when side menu open. I want to create pull request but due to my lack of knowledge, I just wrote my code in this page.

In the "Xamarin-Sidebar-Unified" project, find the "Sidebar.cs" file and make some change with below code

  1. Add HideStatusBar member variable in the line 99
    public bool HideStatusBar { get; set; }

  2. Add Default value of HideStatusBar in the SetDefaults() methods in the line 225
    HideStatusBar = true;

  3. Add the setstatusbarhidden method in the OpenMenu(), CloseMenu() method in the line 121 like this

public void OpenMenu()
        {
            if (IsOpen || Disabled)
                return;
            ShowShadow();
            _sidebarContentArea.BeforeOpenAnimation();
// INSERT THIS CODE
            if (HideStatusBar)
                UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Slide);
// INSERT THIS CODE

            UIView.Animate(
                Sidebar.SlideSpeed, 
                0, 
                UIViewAnimationOptions.CurveEaseInOut,
                () => { 
                    _sidebarContentArea.OpenAnimation(MenuLocation, MenuWidth); 

                },
                () => {
                    _sidebarContentArea.AfterOpenAnimation(TapGesture);
                    IsOpen = true;
                });
        }

public void CloseMenu(bool animate = true)
{
            if (!IsOpen || Disabled)
                return;
            MenuViewController.View.EndEditing(true);
// INSERT THIS CODE
            if(HideStatusBar)
                UIApplication.SharedApplication.SetStatusBarHidden(false, UIStatusBarAnimation.Slide);
// INSERT THIS CODE
            UIView.Animate(
                animate ? Sidebar.SlideSpeed : 0, 
                0, 
                UIViewAnimationOptions.CurveEaseInOut, 
                () => { _sidebarContentArea.CloseAnimation(); }, 
                () => {
                    _sidebarContentArea.AfterCloseAnimation(TapGesture);
                    IsOpen = false;
                });
            HideShadow();
}
  1. Build the "Xamarin-Sidebar-Unified" project

  2. Open the Project options and check the output path

  3. In the output path folder, find the Xamarin-Sidebar-Unified.dll

  4. Open your own project

  5. Edit References -> .Net Assembly -> Browse -> (Above output path) -> select Xamarin-Sidebar-Unified.dll

  6. Open Info.plist with text editor (like sublime text) to add this key value pair inside area
    UIViewControllerBasedStatusBarAppearance

Content hidden

Jack, if i try ti add content to the bottom of screen with constraints 0, it doesnt appears on screen. Its like the ContentController size i wrong or something like that. Cna you help me my friend?

ChangeContentView() problem causes existing views to have tap events hidden.

ChangeContentView() does not correctly remove the _tapGesture recognizer from the existing view when the menu is open, causing it to no longer receive any tap events if the view is re shown when calling the ChangeContentView()

My suggested change starts after line 267 at SidebarController.cs:

public void ChangeContentView(UIViewController newContentView) {
            if (_contentAreaView != null)
{
                _contentAreaView.RemoveFromSuperview();
//Ensure the old gesture recognizers are removed from the view to prevent usability conflicts, especially if this view is re shown at a later time.
if (_tapGesture != null && IsOpen)
 _contentAreaView.RemoveGestureRecognizer (_tapGesture);

if (_panGesture != null)
 _contentAreaView.RemoveGestureRecognizer (_panGesture); 
}
......

Change project title on Github

The current title: A slideout navigation control for Monotouch. is a bit outdated. Can you change this to something like: A slideout navigation control for Xamarin.iOS.

Customize gesture starting touch area

Hi,
It is really good sidebar for Xamarin but I want to change starting touch area form 50 to another value,
Could you customise your control?
I have found next code in your sources, you can change 50 to some property, it will be enough as I think.

if (MenuLocation == MenuLocations.Left)
_ignorePan = _panGesture.LocationInView(view).X > 50;
else
_ignorePan = _panGesture.LocationInView(view).X < view.Bounds.Width - 50;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.