summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Maps.iOS/FormsMaps.cs
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-01-16 19:36:49 (GMT)
committerRui Marinho <me@ruimarinho.net>2017-01-16 19:36:49 (GMT)
commit5fec30f288fffd6ad7c11a0557c809f3befdd79a (patch)
tree122afcc742a7546169df9bf16c204de76955e24b /Xamarin.Forms.Maps.iOS/FormsMaps.cs
parentec8bcd443a20d79f06bc2de1ba6b463c03f63d47 (diff)
downloadxamarin-forms-5fec30f288fffd6ad7c11a0557c809f3befdd79a.zip
xamarin-forms-5fec30f288fffd6ad7c11a0557c809f3befdd79a.tar.gz
xamarin-forms-5fec30f288fffd6ad7c11a0557c809f3befdd79a.tar.bz2
Pool and reuse MKMapView instances on iOS 9 as well as iOS 10 (#680)
Diffstat (limited to 'Xamarin.Forms.Maps.iOS/FormsMaps.cs')
-rw-r--r--Xamarin.Forms.Maps.iOS/FormsMaps.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Xamarin.Forms.Maps.iOS/FormsMaps.cs b/Xamarin.Forms.Maps.iOS/FormsMaps.cs
index 19c0701..a87cb8d 100644
--- a/Xamarin.Forms.Maps.iOS/FormsMaps.cs
+++ b/Xamarin.Forms.Maps.iOS/FormsMaps.cs
@@ -7,6 +7,7 @@ namespace Xamarin
{
static bool s_isInitialized;
static bool? s_isiOs8OrNewer;
+ static bool? s_isiOs9OrNewer;
static bool? s_isiOs10OrNewer;
internal static bool IsiOs8OrNewer
@@ -19,6 +20,16 @@ namespace Xamarin
}
}
+ internal static bool IsiOs9OrNewer
+ {
+ get
+ {
+ if (!s_isiOs9OrNewer.HasValue)
+ s_isiOs9OrNewer = UIDevice.CurrentDevice.CheckSystemVersion(9, 0);
+ return s_isiOs9OrNewer.Value;
+ }
+ }
+
internal static bool IsiOs10OrNewer
{
get