/// <summary> /// Initializes a new instance of the <see cref="SlideoutNavigationController"/> class. /// </summary> public SlideoutNavigationController() { SlideSpeed = 0.2f; SlideWidth = 260f; SlideHeight = 44f; LayerShadowing = true; _internalMenuView = new ProxyNavigationController { ParentController = this, View = { AutoresizingMask = UIViewAutoresizing.FlexibleHeight } }; //_internalMenuView.SetNavigationBarHidden(true, false); _internalTopView = new UIViewController { View = { UserInteractionEnabled = true } }; _internalTopView.View.Layer.MasksToBounds = false; _tapGesture = new UITapGestureRecognizer(); // _tapGesture.AddTarget(new ) _tapGesture.AddTarget(Hide); _tapGesture.NumberOfTapsRequired = 1; _panGesture = new UIPanGestureRecognizer { Delegate = new SlideoutPanDelegate(this), MaximumNumberOfTouches = 1, MinimumNumberOfTouches = 1 }; _panGesture.AddTarget(() => Pan(_internalTopView.View)); _internalTopView.View.AddGestureRecognizer(_panGesture); }
/// <summary> /// Initializes a new instance of the <see cref="SlideoutNavigationController"/> class. /// </summary> public SlideoutNavigationController() { SlideSpeed = 0.2f; SlideWidth = 245f; // HACK to detect pan gesture from the whole viewport SlideHeight = float.MaxValue; LayerShadowing = false; _internalMenuViewLeft = new ProxyNavigationController { ParentController = this, View = { AutoresizingMask = UIViewAutoresizing.FlexibleHeight } }; _internalMenuViewRight = new ProxyNavigationController { ParentController = this, View = { AutoresizingMask = UIViewAutoresizing.FlexibleHeight } }; _internalMenuViewLeft.SetNavigationBarHidden (DisplayNavigationBarOnLeftMenu, false); _internalMenuViewRight.SetNavigationBarHidden (DisplayNavigationBarOnRightMenu, false); _internalTopView = new UIViewController { View = { UserInteractionEnabled = true } }; _internalTopView.View.Layer.MasksToBounds = false; _tapGesture = new UITapGestureRecognizer (); _tapGesture.AddTarget (() => Hide ()); _tapGesture.NumberOfTapsRequired = 1; _panGesture = new UIPanGestureRecognizer { Delegate = new SlideoutPanDelegate(this), MaximumNumberOfTouches = 1, MinimumNumberOfTouches = 1 }; _panGesture.AddTarget (() => Pan (_internalTopView.View)); _internalTopView.View.AddGestureRecognizer (_panGesture); }
public RevealController() { AnimationSpeed = 0.2f; HideStatusBar = true; internalMenuView = new ProxyNavigationController { ParentController = this, View = { AutoresizingMask = UIViewAutoresizing.FlexibleHeight } }; internalTopView = new UIViewController { View = { UserInteractionEnabled = true } }; internalTopView.View.Layer.MasksToBounds = false; tapGesture = new UITapGestureRecognizer(); tapGesture.AddTarget(Hide); tapGesture.NumberOfTapsRequired = 1; }
/// <summary> /// Initializes a new instance of the <see cref="SlideoutController"/> class. /// </summary> public SlideoutController(IntPtr handle) : base(handle) { this.NavigationControllerCreator = delegate(UIViewController view) { return(new UINavigationController(view)); }; SlideSpeed = 0.2f; SlideWidth = 245f; SlideHeight = 44f; LayerShadowing = false; _internalMenuViewLeft = new ProxyNavigationController { ParentController = this, View = { AutoresizingMask = UIViewAutoresizing.FlexibleHeight } }; _internalMenuViewRight = new ProxyNavigationController { ParentController = this, View = { AutoresizingMask = UIViewAutoresizing.FlexibleHeight } }; _internalMenuViewLeft.SetNavigationBarHidden(DisplayNavigationBarOnLeftMenu, false); _internalMenuViewRight.SetNavigationBarHidden(DisplayNavigationBarOnRightMenu, false); _internalTopView = new UIViewController { View = { UserInteractionEnabled = true } }; _internalTopView.View.Layer.MasksToBounds = false; _tapGesture = new UITapGestureRecognizer(); _tapGesture.AddTarget(() => Hide()); _tapGesture.NumberOfTapsRequired = 1; _panGesture = new UIPanGestureRecognizer { Delegate = new SlideoutPanDelegate(this), MaximumNumberOfTouches = 1, MinimumNumberOfTouches = 1 }; _panGesture.AddTarget(() => Pan(_internalTopView.View)); _internalTopView.View.AddGestureRecognizer(_panGesture); }