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 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;
			}
		}