当前位置: 首页>>代码示例>>C#>>正文


C# MonoTouch.SelectRow方法代码示例

本文整理汇总了C#中MonoTouch.SelectRow方法的典型用法代码示例。如果您正苦于以下问题:C# MonoTouch.SelectRow方法的具体用法?C# MonoTouch.SelectRow怎么用?C# MonoTouch.SelectRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MonoTouch的用法示例。


在下文中一共展示了MonoTouch.SelectRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RowSelected

		public void RowSelected (MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
		{
			switch (indexPath.Section) {
			case 0: //MMDrawerSectionViewSelection
				MMExampleCenterTableViewController center = new MMExampleCenterTableViewController ();
				UINavigationController nav = new UINavigationController (center);
				if (indexPath.Row % 2 == 0) {
					MMDrawerController_UIViewController.Mm_drawerController.CenterViewController = nav;
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerAnimated (true, null);
				} else {
					MMDrawerController_UIViewController.Mm_drawerController.CenterViewController = nav;
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerAnimated (true, null);
				}
				break;
			case 1: //MMDrawerSectionDrawerWidth
				break;
			case 2: //MMDrawerSectionShadowToggle
				MMDrawerController_UIViewController.Mm_drawerController.ShowsShadow = MMDrawerController_UIViewController.Mm_drawerController.ShowsShadow;
				tableView.ReloadSections (NSIndexSet.FromIndex (indexPath.Section), UITableViewRowAnimation.None);
				break;
			case 3: //MMDrawerSectionOpenDrawerGestures
				switch (indexPath.Row) {
				case 0:
					MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask = MMOpenDrawerGestureMode.PanningNavigationBar;
					break;
				case 1:
					MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask = MMOpenDrawerGestureMode.PanningCenterView;
					break;
				case 2:
					MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask = MMOpenDrawerGestureMode.BezelPanningCenterView;
					break;
				default:
					break;
				}
				tableView.ReloadRows (new NSIndexPath[]{ indexPath }, UITableViewRowAnimation.None);
				break;
			case 4: //MMDrawerSectionCloseDrawerGestures
				switch (indexPath.Row) {
				case 0:
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask = MMCloseDrawerGestureMode.PanningNavigationBar;
					break;
				case 1:
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask = MMCloseDrawerGestureMode.PanningCenterView;
					break;
				case 2:
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask = MMCloseDrawerGestureMode.BezelPanningCenterView;
					break;
				case 3:
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask = MMCloseDrawerGestureMode.TapNavigationBar;
					break;
				case 4:
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask = MMCloseDrawerGestureMode.TapCenterView;
					break;
				case 5:
					MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask = MMCloseDrawerGestureMode.PanningDrawerView;
					break;
				default:
					break;
				}
				tableView.ReloadRows (new NSIndexPath[]{ indexPath }, UITableViewRowAnimation.None);
				break;
			case 5: //MMDrawerSectionCenterHiddenInteraction
				tableView.ReloadRows (new NSIndexPath[]{ indexPath }, UITableViewRowAnimation.None);
				break;
			case 6: //MMDrawerSectionStretchDrawer
				MMDrawerController_UIViewController.Mm_drawerController.ShouldStretchDrawer = !MMDrawerController_UIViewController.Mm_drawerController.ShouldStretchDrawer;
				tableView.ReloadSections (NSIndexSet.FromIndex (indexPath.Section), UITableViewRowAnimation.None);
				break;
			default:
				break;
			}
			tableView.SelectRow (indexPath, false, UITableViewScrollPosition.None);
			tableView.DeselectRow (indexPath, true);
		}
开发者ID:adlair,项目名称:MMDrawerController,代码行数:74,代码来源:MMExampleSideDrawerViewController.cs

示例2: DidSelectRow

		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;
			}
		}
开发者ID:adlair,项目名称:MMDrawerController,代码行数:42,代码来源:MMExampleCenterTableViewController.cs


注:本文中的MonoTouch.SelectRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。