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


C# UINavigationController.PresentViewController方法代码示例

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


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

示例1: ComposeSMS

 /// <summary>
 /// Composes the SM.
 /// </summary>
 /// <param name="controller">Controller.</param>
 /// <param name="recipients">Recipients.</param>
 /// <param name="message">Message.</param>
 public static void ComposeSMS(UINavigationController controller, string[] recipients, string message)
 {
     MFMessageComposeViewController smsController = new MFMessageComposeViewController();
     smsController.Recipients = recipients;
     smsController.Body = message;
     smsController.Finished += (sender, e) => {
         smsController.DismissViewController(true, null);
     };
     controller.PresentViewController(smsController, true, null);
 }
开发者ID:hoangnm284,项目名称:MobileUtils,代码行数:16,代码来源:Utils.cs

示例2: FinishedLaunching

        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            var welcomeView = new WelcomeView(UIScreen.MainScreen.ApplicationFrame);
            _window.AddSubview(welcomeView);

            welcomeView.Done += () => {
                var rootController = new UINavigationController();
                _window.RootViewController = rootController;

                var gettingStarted = new GettingStartedViewController();
                gettingStarted.Done += () => _locationService.GetCurrentLocation(coordinate => {
                    var me = new Ninja {
                        GroupName = gettingStarted.GroupName,
                        Latitude = coordinate.Latitude,
                        Longitude = coordinate.Longitude,
                        NickName = gettingStarted.Nickname
                    };

                    NinjaClient = new ServiceClient(gettingStarted) {
                        AuthenticationProvider = gettingStarted.AuthenticationProvider
                    };

                    NinjaClient.LocateNinjas(me, ninjasLocated => InvokeOnMainThread(() => {
                        rootController.DismissViewController(true, null);
                        var mapView = new MapViewController(coordinate, ninjasLocated);
                        mapView.Title = me.GroupName;
                        rootController.PushViewController(mapView, true);
                    }));
                });

                rootController.PresentViewController(gettingStarted, true, null);
            };

            _window.MakeKeyAndVisible();

            return true;
        }
开发者ID:samilamti,项目名称:ninja-locator,代码行数:39,代码来源:AppDelegate.cs

示例3: FinishedLaunching

		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			Window = new UIWindow (UIScreen.MainScreen.Bounds);
			ViewController = new ViewController ();

			var navigationController = new UINavigationController (ViewController) {
				NavigationBarHidden = true
			};

			GKLocalPlayer.LocalPlayer.AuthenticateHandler = (viewController, error) => {
				if (error != null) {
					Console.WriteLine ("Error while trying to authenticate local player: " + error.Description);
					return;
				}
				if (GKLocalPlayer.LocalPlayer.Authenticated || (viewController == null))
					return;
				navigationController.PresentViewController (viewController, true, null);
			};

			Window.RootViewController = navigationController;
			Window.MakeKeyAndVisible ();
			return true;
		}
开发者ID:Rajneesh360Logica,项目名称:monotouch-samples,代码行数:23,代码来源:AppDelegate.cs

示例4: PresentView

		private void PresentView (UINavigationController navigationController, UIViewController view)
		{
			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) {
				view.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;
				view.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
				navigationController.PresentViewController (view, true, null);
			}
			else {
				navigationController.PushViewController (view, true);
			}
		}
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:11,代码来源:UIMethods.cs


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