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


C# UIInterfaceOrientation.ToString方法代码示例

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


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

示例1: ShouldAutorotateToInterfaceOrientation

		public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
		{
			if (DisableRotation)
				return toInterfaceOrientation == InterfaceOrientation;

			UIInterfaceOrientationMask mask = CurrentViewController.GetSupportedInterfaceOrientations();
			UIInterfaceOrientation orientation = CurrentViewController.PreferredInterfaceOrientationForPresentation();

			bool theReturn = CurrentViewController == null
				? true
				: CurrentViewController.ShouldAutorotateToInterfaceOrientation(toInterfaceOrientation);

			if (CurrentViewController != null)
				Debug.WriteLine("Should auto rotate: " + toInterfaceOrientation.ToString() + ": " + theReturn);
			else
				Debug.WriteLine("Should auto rotate: View is null");

			return theReturn;
		}
开发者ID:insjinger,项目名称:FlyoutNavigation,代码行数:19,代码来源:FlyoutNavigationController.cs

示例2: ShouldAutorotateToInterfaceOrientation

        /// DEPRECATED for iOS 6 and later, but needed for iOS 5 and earlier to support additional orientations
        public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
        {
            bool shouldAutorotate = IPhoneUtils.GetInstance ().ShouldAutorotate ();

            if (shouldAutorotate) {
                // Check supported orientations
                if (supportedOrientations != null) {
                    bool orientationSupported = false;
                    for (uint index = 0; index < supportedOrientations.Count; index++) {
                        NSString mySupportedOrientation = new NSString (supportedOrientations.ValueAt (index));
                        if (("UIInterfaceOrientation" + toInterfaceOrientation.ToString ()) == mySupportedOrientation.ToString ()) {
                            orientationSupported = true;
                            break;
                        }
                    }
                    shouldAutorotate = orientationSupported;
                } else {
                    log ("Supported orientations not configured. All orientations are supported by default");
                }
            } else {
                log (" ** Autorotation blocked by application at runtime. ");
            }

            log ("Should Autorotate to " + toInterfaceOrientation.ToString () + "? " + shouldAutorotate);

            if(shouldAutorotate) this.ShowSplashScreenOnStartupTime(toInterfaceOrientation);

            return shouldAutorotate;
        }
开发者ID:jioe,项目名称:appverse-mobile,代码行数:30,代码来源:UnityUI_iOSViewController.cs

示例3: ShouldAutorotateToInterfaceOrientation

 public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
 {
     Console.WriteLine ("---> ShouldAutorotateToInterfaceOrientation: " + toInterfaceOrientation.ToString ());
     return false;
 }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:5,代码来源:ProvisionDialog.cs

示例4: WillRotate

 public override void WillRotate(UIInterfaceOrientation toInterfaceOrientation, double duration)
 {
     label.Text = toInterfaceOrientation.ToString();
 }
开发者ID:lobrien,项目名称:RespondingToOrientationChangeMonoTouch,代码行数:4,代码来源:RotatingViews.xib.cs

示例5: DidRotate

 public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation)
 {
     Console.WriteLine("Finished rotating from " + fromInterfaceOrientation.ToString());
 }
开发者ID:lobrien,项目名称:RespondingToOrientationChangeMonoTouch,代码行数:4,代码来源:RotatingViews.xib.cs


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