summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-08-10 18:08:18 (GMT)
committerRui Marinho <me@ruimarinho.net>2017-08-10 18:08:18 (GMT)
commit0ff50e2418c1620a86c01004f35dd2855bfe4c0f (patch)
treed7bb35796300b51daea67ad3a37080104aa38dae /Xamarin.Forms.Platform.iOS
parent1aab6ff4893935fb3bb91187d2d3fa796576198a (diff)
downloadxamarin-forms-0ff50e2418c1620a86c01004f35dd2855bfe4c0f.zip
xamarin-forms-0ff50e2418c1620a86c01004f35dd2855bfe4c0f.tar.gz
xamarin-forms-0ff50e2418c1620a86c01004f35dd2855bfe4c0f.tar.bz2
Add support for backcompat hint flags (#1074)
* Add support for backcompat hint flags * Making fast renderers internal and sealed while experimental
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Flags.cs7
-rw-r--r--Xamarin.Forms.Platform.iOS/Forms.cs13
-rw-r--r--Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj3
3 files changed, 22 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Flags.cs b/Xamarin.Forms.Platform.iOS/Flags.cs
new file mode 100644
index 0000000..ae565a4
--- /dev/null
+++ b/Xamarin.Forms.Platform.iOS/Flags.cs
@@ -0,0 +1,7 @@
+´╗┐namespace Xamarin.Forms
+{
+ internal static class Flags
+ {
+
+ }
+}
diff --git a/Xamarin.Forms.Platform.iOS/Forms.cs b/Xamarin.Forms.Platform.iOS/Forms.cs
index f2ba923..ca1e2cf 100644
--- a/Xamarin.Forms.Platform.iOS/Forms.cs
+++ b/Xamarin.Forms.Platform.iOS/Forms.cs
@@ -66,6 +66,19 @@ namespace Xamarin.Forms
}
#endif
+ static IReadOnlyList<string> s_flags;
+ public static IReadOnlyList<string> Flags => s_flags ?? (s_flags = new List<string>().AsReadOnly());
+
+ public static void SetFlags(params string[] flags)
+ {
+ if (IsInitialized)
+ {
+ throw new InvalidOperationException($"{nameof(SetFlags)} must be called before {nameof(Init)}");
+ }
+
+ s_flags = flags.ToList().AsReadOnly();
+ }
+
public static void Init()
{
if (IsInitialized)
diff --git a/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj b/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj
index c7f0278..d89574a 100644
--- a/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj
+++ b/Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj
@@ -134,6 +134,7 @@
<Compile Include="ExportRendererAttribute.cs" />
<Compile Include="Extensions\ArrayExtensions.cs" />
<Compile Include="Extensions\PlatformConfigurationExtensions.cs" />
+ <Compile Include="Flags.cs" />
<Compile Include="NativeViewWrapper.cs" />
<Compile Include="NativeViewWrapperRenderer.cs" />
<Compile Include="PlatformEffect.cs" />
@@ -207,4 +208,4 @@
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
-</Project>
+</Project> \ No newline at end of file