summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/Extensions/PlatformConfigurationExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Extensions/PlatformConfigurationExtensions.cs')
-rw-r--r--Xamarin.Forms.Platform.iOS/Extensions/PlatformConfigurationExtensions.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Extensions/PlatformConfigurationExtensions.cs b/Xamarin.Forms.Platform.iOS/Extensions/PlatformConfigurationExtensions.cs
index f61837f..f2932e3 100644
--- a/Xamarin.Forms.Platform.iOS/Extensions/PlatformConfigurationExtensions.cs
+++ b/Xamarin.Forms.Platform.iOS/Extensions/PlatformConfigurationExtensions.cs
@@ -1,11 +1,18 @@
+#if __MOBILE__
+using CurrentPlatform = Xamarin.Forms.PlatformConfiguration.iOS;
namespace Xamarin.Forms.Platform.iOS
+#else
+using CurrentPlatform = Xamarin.Forms.PlatformConfiguration.macOS;
+
+namespace Xamarin.Forms.Platform.MacOS
+#endif
{
public static class PlatformConfigurationExtensions
{
- public static IPlatformElementConfiguration<PlatformConfiguration.iOS, T> OnThisPlatform<T>(this T element)
+ public static IPlatformElementConfiguration<CurrentPlatform, T> OnThisPlatform<T>(this T element)
where T : Element, IElementConfiguration<T>
{
- return (element).On<PlatformConfiguration.iOS>();
+ return (element).On<CurrentPlatform>();
}
}
} \ No newline at end of file