Example #1
0
        public void DidSelectRow(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
        {
            switch (indexPath.Section)
            {
            case 1:
            case 3:
                MMExampleDrawerVisualStateManager sharedManager = new MMExampleDrawerVisualStateManager();
                if (indexPath.Section == 1)
                {
                    //sharedManager.LeftDrawerAnimationType = indexPath.Row;
                }
                else
                {
                    //sharedManager.RightDrawerAnimationType = indexPath.Row;
                }
                //tableView.ReloadSections (indexPath.Section, UITableViewRowAnimation.None);
                tableView.SelectRow(indexPath, false, UITableViewScrollPosition.None);
                tableView.DeselectRow(indexPath, true);
                break;

            case 0:
            case 2:
                UIViewController sideDrawerViewController = MMDrawerController_UIViewController.Mm_drawerController.RightDrawerViewController;
                ;
                MMDrawerSide drawerSide = MMDrawerSide.None;
                if (indexPath.Section == 0)
                {
                    drawerSide = MMDrawerSide.Left;
                }
                else if (indexPath.Section == 2)
                {
                    sideDrawerViewController = MMDrawerController_UIViewController.Mm_drawerController.RightDrawerViewController;
                    drawerSide = MMDrawerSide.Right;
                }

                if (sideDrawerViewController != null)
                {
                    MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerAnimated(true, completion());
                }
                else if (drawerSide == MMDrawerSide.Left)
                {
                    UIViewController       vc   = new MMExampleLeftSideDrawerViewController();
                    UINavigationController navC = new MMNavigationController(vc);
                    MMDrawerController_UIViewController.Mm_drawerController.RightDrawerViewController = navC;
                    this.SetupRightButton();
                }
                //tableView.ReloadRow (indexPath, UITableViewRowAnimation.None);
                tableView.SelectRow(indexPath, false, UITableViewScrollPosition.None);
                break;

            default:
                break;
            }
        }
        public unsafe static void OpenDrawerSide(this MMDrawerController This, MMDrawerSide drawerSide, bool animated, float velocity, global::MonoTouch.UIKit.UIViewAnimationOptions options, [BlockProxy(typeof(MonoTouch.ObjCRuntime.Trampolines.NIDAction))] global::System.Action Completion)
        {
            if (Completion == null)
            {
                throw new ArgumentNullException("Completion");
            }
            BlockLiteral *block_ptr_Completion;
            BlockLiteral  block_Completion;

            block_Completion     = new BlockLiteral();
            block_ptr_Completion = &block_Completion;
            block_Completion.SetupBlock(Trampolines.SDAction.Handler, Completion);

            ApiDefinitions.Messaging.void_objc_msgSend_int_bool_float_int_IntPtr(This.Handle, selOpenDrawerSideAnimatedVelocityAnimationOptionsCompletion_Handle, (int)drawerSide, animated, velocity, (int)options, (IntPtr)block_ptr_Completion);
            block_ptr_Completion->CleanupBlock();
        }
        public unsafe virtual void ToggleDrawerSide(MMDrawerSide drawerSide, bool animated, [BlockProxy(typeof(MonoTouch.ObjCRuntime.Trampolines.NIDAction))] global::System.Action completion)
        {
            if (completion == null)
            {
                throw new ArgumentNullException("completion");
            }
            BlockLiteral *block_ptr_completion;
            BlockLiteral  block_completion;

            block_completion     = new BlockLiteral();
            block_ptr_completion = &block_completion;
            block_completion.SetupBlock(Trampolines.SDAction.Handler, completion);

            if (IsDirectBinding)
            {
                ApiDefinitions.Messaging.void_objc_msgSend_int_bool_IntPtr(this.Handle, selToggleDrawerSideAnimatedCompletion_Handle, (int)drawerSide, animated, (IntPtr)block_ptr_completion);
            }
            else
            {
                ApiDefinitions.Messaging.void_objc_msgSendSuper_int_bool_IntPtr(this.SuperHandle, selToggleDrawerSideAnimatedCompletion_Handle, (int)drawerSide, animated, (IntPtr)block_ptr_completion);
            }
            block_ptr_completion->CleanupBlock();
        }
Example #4
0
		public Action DrawerAction(MMDrawerController.MMDrawerController drawerControler, MMDrawerSide drawSide, Single porcentVisible){
			//drawerControler.DrawerVisualStateBlock=mmex
			return null;
		}
		public unsafe static void OpenDrawerSide (this MMDrawerController This, MMDrawerSide drawerSide, bool animated, float velocity, global::MonoTouch.UIKit.UIViewAnimationOptions options, [BlockProxy (typeof (MonoTouch.ObjCRuntime.Trampolines.NIDAction))]global::System.Action Completion)
		{
			if (Completion == null)
				throw new ArgumentNullException ("Completion");
			BlockLiteral *block_ptr_Completion;
			BlockLiteral block_Completion;
			block_Completion = new BlockLiteral ();
			block_ptr_Completion = &block_Completion;
			block_Completion.SetupBlock (Trampolines.SDAction.Handler, Completion);
			
			ApiDefinitions.Messaging.void_objc_msgSend_int_bool_float_int_IntPtr (This.Handle, selOpenDrawerSideAnimatedVelocityAnimationOptionsCompletion_Handle, (int)drawerSide, animated, velocity, (int)options, (IntPtr) block_ptr_Completion);
			block_ptr_Completion->CleanupBlock ();
			
		}
		public static void PrepareToPresentDrawer (this MMDrawerController This, MMDrawerSide drawer, bool animated)
		{
			ApiDefinitions.Messaging.void_objc_msgSend_int_bool (This.Handle, selPrepareToPresentDrawerAnimated_Handle, (int)drawer, animated);
		}
Example #7
0
 public Action DrawerAction(MMDrawerController.MMDrawerController drawerControler, MMDrawerSide drawSide, Single porcentVisible)
 {
     //drawerControler.DrawerVisualStateBlock=mmex
     return(null);
 }
 public static void PrepareToPresentDrawer(this MMDrawerController This, MMDrawerSide drawer, bool animated)
 {
     ApiDefinitions.Messaging.void_objc_msgSend_int_bool(This.Handle, selPrepareToPresentDrawerAnimated_Handle, (int)drawer, animated);
 }
		public unsafe virtual void ToggleDrawerSide (MMDrawerSide drawerSide, bool animated, [BlockProxy (typeof (MonoTouch.ObjCRuntime.Trampolines.NIDAction))]global::System.Action completion)
		{
			if (completion == null)
				throw new ArgumentNullException ("completion");
			BlockLiteral *block_ptr_completion;
			BlockLiteral block_completion;
			block_completion = new BlockLiteral ();
			block_ptr_completion = &block_completion;
			block_completion.SetupBlock (Trampolines.SDAction.Handler, completion);
			
			if (IsDirectBinding) {
				ApiDefinitions.Messaging.void_objc_msgSend_int_bool_IntPtr (this.Handle, selToggleDrawerSideAnimatedCompletion_Handle, (int)drawerSide, animated, (IntPtr) block_ptr_completion);
			} else {
				ApiDefinitions.Messaging.void_objc_msgSendSuper_int_bool_IntPtr (this.SuperHandle, selToggleDrawerSideAnimatedCompletion_Handle, (int)drawerSide, animated, (IntPtr) block_ptr_completion);
			}
			block_ptr_completion->CleanupBlock ();
			
		}