本文整理汇总了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;
}
示例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;
}
示例3: ShouldAutorotateToInterfaceOrientation
public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
{
Console.WriteLine ("---> ShouldAutorotateToInterfaceOrientation: " + toInterfaceOrientation.ToString ());
return false;
}
示例4: WillRotate
public override void WillRotate(UIInterfaceOrientation toInterfaceOrientation, double duration)
{
label.Text = toInterfaceOrientation.ToString();
}
示例5: DidRotate
public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation)
{
Console.WriteLine("Finished rotating from " + fromInterfaceOrientation.ToString());
}