summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-11-16 10:14:17 -0700
committerGitHub <noreply@github.com>2016-11-16 10:14:17 -0700
commitbc7755ca56e3958318434263d74611c249a59aff (patch)
tree7c3be788362a636fd793180d1eb5c0b24d39f576 /Xamarin.Forms.Platform.iOS
parent85b349c380f18f722f484b50f285061d25fb1db6 (diff)
downloadxamarin-forms-bc7755ca56e3958318434263d74611c249a59aff.tar.gz
xamarin-forms-bc7755ca56e3958318434263d74611c249a59aff.tar.bz2
xamarin-forms-bc7755ca56e3958318434263d74611c249a59aff.zip
Use static method syntax to prevent mono compiler error (#538)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs21
1 files changed, 4 insertions, 17 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
index 676c73ae..0d6601c7 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
@@ -432,23 +432,10 @@ namespace Xamarin.Forms.Platform.iOS
void UpdateCurrentPagePreferredStatusBarUpdateAnimation()
{
- PageUIStatusBarAnimation animation = ((Page)Element).OnThisPlatform().PreferredStatusBarUpdateAnimation();
- Current.OnThisPlatform().SetPreferredStatusBarUpdateAnimation(animation);
- }
-
- UIKit.UIStatusBarAnimation GetPreferredStatusBarUpdateAnimation()
- {
- var animation = Current.OnThisPlatform().PreferredStatusBarUpdateAnimation();
- switch (animation)
- {
- case (PageUIStatusBarAnimation.Fade):
- return UIKit.UIStatusBarAnimation.Fade;
- case (PageUIStatusBarAnimation.Slide):
- return UIKit.UIStatusBarAnimation.Slide;
- case (PageUIStatusBarAnimation.None):
- default:
- return UIKit.UIStatusBarAnimation.None;
- }
+ // Not using the extension method syntax here because for some reason it confuses the mono compiler
+ // and throws a CS0121 error
+ PageUIStatusBarAnimation animation = PlatformConfiguration.iOSSpecific.Page.PreferredStatusBarUpdateAnimation(((Page)Element).OnThisPlatform());
+ PlatformConfiguration.iOSSpecific.Page.SetPreferredStatusBarUpdateAnimation(Current.OnThisPlatform(), animation);
}
void UpdateTranslucent()