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


C# UISplitViewController类代码示例

本文整理汇总了C#中UISplitViewController的典型用法代码示例。如果您正苦于以下问题:C# UISplitViewController类的具体用法?C# UISplitViewController怎么用?C# UISplitViewController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: FinishedLaunching

		//
		// This method is invoked when the application has loaded and is ready to run. In this 
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			
			// load the appropriate UI, depending on whether the app is running on an iPhone or iPad
			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
				var controller = new RootViewController ();
				navigationController = new UINavigationController (controller);
				window.RootViewController = navigationController;
			} else {
				var masterViewController = new RootViewController ();
				var masterNavigationController = new UINavigationController (masterViewController);
				var detailViewController = new DetailViewController ();
				var detailNavigationController = new UINavigationController (detailViewController);
				
				splitViewController = new UISplitViewController ();
				splitViewController.WeakDelegate = detailViewController;
				splitViewController.ViewControllers = new UIViewController[] {
					masterNavigationController,
					detailNavigationController
				};
				
				window.RootViewController = splitViewController;
			}

			// make the window visible
			window.MakeKeyAndVisible ();
			
			return true;
		}
开发者ID:XamarinControls,项目名称:govindaraokondala-horizontal-scrolling-in-Table-in-IOS,代码行数:38,代码来源:AppDelegate.cs

示例2: SetRootViewController

		protected override void SetRootViewController ()
		{
			if (IsPhone) {

				window.RootViewController = docListNav;

			} else {

				var blankVC = new BlankVC ();
				blankVC.View.BackgroundColor = UIColor.White;

				detailNav = new UINavigationController (blankVC);
				detailNav.NavigationBar.BarStyle = Theme.NavigationBarStyle;
				detailNav.ToolbarHidden = false;
				Theme.Apply (detailNav.Toolbar);

				split = new UISplitViewController {
					PresentsWithGesture = false,
					ViewControllers = new UIViewController[] {
						docListNav,
						detailNav,
					},
					Delegate = new SplitDelegate (),
				};

				window.RootViewController = split;
			}
		}
开发者ID:praeclarum,项目名称:Praeclarum,代码行数:28,代码来源:DocumentListAppDelegate.cs

示例3: ShouldHideViewController

 public override bool ShouldHideViewController(UISplitViewController svc, UIViewController viewController, UIInterfaceOrientation inOrientation)
 {
     //return true; // always hide
     //return true; // never hide
     return inOrientation == UIInterfaceOrientation.Portrait
         || inOrientation == UIInterfaceOrientation.PortraitUpsideDown;
 }
开发者ID:yofanana,项目名称:recipes,代码行数:7,代码来源:SplitViewContoller.cs

示例4: DisplayContentController

 /// <summary>
 /// Displays the content UISplitViewController.
 /// </summary>
 /// <param name="content">The content.</param>
 public void DisplayContentController(UISplitViewController content)
 {
     AddChildViewController(content);
     content.View.Frame = View.Frame;
     View.AddSubview(content.View);
     DidMoveToParentViewController(this);
 }
开发者ID:jamsoft,项目名称:MvvmCross-iOSSupport,代码行数:11,代码来源:MvxSplitViewControllerHost.cs

示例5: WillShowViewController

        public override void WillShowViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
        {
            _pc = null;
            _lefty = null;

            ReplaceDetailNavigationViewController();
        }
开发者ID:benhorgen,项目名称:monocross_helpers,代码行数:7,代码来源:SplitViewControllerDelegate.cs

示例6: FinishedLaunching

        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            var masterViewController = new RootViewController ();
            var masterNavigationController = new UINavigationController (masterViewController);
            var detailViewController = new DetailViewController ();
            var detailNavigationController = new UINavigationController (detailViewController);

            masterViewController.DetailViewController = detailViewController;

            splitViewController = new UISplitViewController ();
            splitViewController.WeakDelegate = detailViewController;
            splitViewController.ViewControllers = new UIViewController[] {
                masterNavigationController,
                detailNavigationController
            };

            window.RootViewController = splitViewController;

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

            return true;
        }
开发者ID:sblom,项目名称:NetDA-Xamarin-Overview,代码行数:33,代码来源:AppDelegate.cs

示例7: WillShowViewController

			public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
			{
				var items = new List<UIBarButtonItem> (Parent.Toolbar.Items);
				items.RemoveAt (0);
				Parent.Toolbar.SetItems (items.ToArray (), true);
				Parent.MainPopoverController = null;
				
			}
开发者ID:BoogieMAN2K,项目名称:monotouch-samples,代码行数:8,代码来源:DetailViewController.cs

示例8: WillHideViewController

			public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
			{
				barButtonItem.Title =  "MasterList";
				var items = new List<UIBarButtonItem> (Parent.Toolbar.Items);
				items.Insert (0, barButtonItem);
				Parent.Toolbar.SetItems (items.ToArray (), true);
				Parent.MainPopoverController = pc;
			}
开发者ID:BoogieMAN2K,项目名称:monotouch-samples,代码行数:8,代码来源:DetailViewController.cs

示例9: WillHideViewController

 public override void WillHideViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
 {
     _svc = svc as SplitViewController;
     _lefty = barButtonItem;
     _lefty.Title = "Home";
     _pc = pc;
     ReplaceDetailNavigationViewController();
 }
开发者ID:benhorgen,项目名称:monocross_helpers,代码行数:8,代码来源:SplitViewControllerDelegate.cs

示例10: WillHideViewController

		public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
		{
			PatientDetailViewController dvc = svc.ViewControllers[1] as PatientDetailViewController;
			
			if (dvc != null) {
				dvc.AddNavBarButton (barButtonItem);
				dvc.Popover = pc;
			}
		}
开发者ID:DnyaneshwarWadghanePM,项目名称:notes-for-nurses-redux,代码行数:9,代码来源:PatientSplitViewController.cs

示例11: WillShowViewController

		public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
		{
			SpeakerSessionMasterDetail dvc = svc.ViewControllers[1] as SpeakerSessionMasterDetail;
			
			if (dvc != null) {
				dvc.RemoveNavBarButton ();
				dvc.Popover = null;
			}
		}
开发者ID:Adameg,项目名称:mobile-samples,代码行数:9,代码来源:SpeakerSplitView.cs

示例12: WillShowViewController

		public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
		{
			PatientDetailViewController dvc = svc.ViewControllers[1] as PatientDetailViewController;
			
			if (dvc != null) {
				dvc.RemoveNavBarButton ();
				dvc.Popover = null;
			}
		}
开发者ID:DnyaneshwarWadghanePM,项目名称:notes-for-nurses-redux,代码行数:9,代码来源:PatientSplitViewController.cs

示例13: WillHideViewController

		public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
		{
			SessionSpeakersMasterDetail dvc = svc.ViewControllers[1] as SessionSpeakersMasterDetail;
			
			if (dvc != null) {
				dvc.AddNavBarButton (barButtonItem);
				dvc.Popover = pc;
			} else Console.WriteLine ("SessionSplitViewController dvc == null (hide)");
		}
开发者ID:slodge,项目名称:mobile-samples,代码行数:9,代码来源:SessionSplitView.cs

示例14: WillShowViewController

		public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
		{
			SessionSpeakersMasterDetail dvc = svc.ViewControllers[1] as SessionSpeakersMasterDetail;
			
			if (dvc != null) {
				dvc.RemoveNavBarButton ();
				dvc.Popover = null;
			} else Console.WriteLine ("SessionSplitViewController dvc == null (show)");
		}
开发者ID:slodge,项目名称:mobile-samples,代码行数:9,代码来源:SessionSplitView.cs

示例15: WillHideViewController

		public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
		{
			SpeakerSessionMasterDetail dvc = svc.ViewControllers[1] as SpeakerSessionMasterDetail;
			
			if (dvc != null) {
				dvc.AddNavBarButton (barButtonItem);
				dvc.Popover = pc;
			}
		}
开发者ID:Adameg,项目名称:mobile-samples,代码行数:9,代码来源:SpeakerSplitView.cs


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