summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Maps.iOS/MapRenderer.cs
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2016-09-14 21:56:17 (GMT)
committerGitHub <noreply@github.com>2016-09-14 21:56:17 (GMT)
commiteb79ff842e701ca4d2c9e1c9d02f654fd2c0f058 (patch)
treef19a733800ada7f18584a35e2f2c8c01dca9245e /Xamarin.Forms.Maps.iOS/MapRenderer.cs
parente6a2bed3b2a532aa2f937fc6a2957458f4680ef9 (diff)
downloadxamarin-forms-eb79ff842e701ca4d2c9e1c9d02f654fd2c0f058.zip
xamarin-forms-eb79ff842e701ca4d2c9e1c9d02f654fd2c0f058.tar.gz
xamarin-forms-eb79ff842e701ca4d2c9e1c9d02f654fd2c0f058.tar.bz2
Remove iOS classic from CI system (#353)beta-2.3.3-pre2
* [CI] Remove classic from build * [Build] Remove classic forwarder * [Nuget] Remove classic from Pages azure * [Build] Remove classic csproj * [IOS] Remove _UNIFIED_
Diffstat (limited to 'Xamarin.Forms.Maps.iOS/MapRenderer.cs')
-rw-r--r--Xamarin.Forms.Maps.iOS/MapRenderer.cs42
1 files changed, 4 insertions, 38 deletions
diff --git a/Xamarin.Forms.Maps.iOS/MapRenderer.cs b/Xamarin.Forms.Maps.iOS/MapRenderer.cs
index c556d14..3f4e7eb 100644
--- a/Xamarin.Forms.Maps.iOS/MapRenderer.cs
+++ b/Xamarin.Forms.Maps.iOS/MapRenderer.cs
@@ -4,31 +4,13 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
-using Xamarin.Forms.Platform.iOS;
-#if __UNIFIED__
-using UIKit;
-using MapKit;
using CoreLocation;
using Foundation;
-#else
-using MonoTouch.UIKit;
-using MonoTouch.Foundation;
-using MonoTouch.CoreLocation;
-using MonoTouch.MapKit;
-using System.Drawing;
-#endif
-#if __UNIFIED__
-using RectangleF = CoreGraphics.CGRect;
-using SizeF = CoreGraphics.CGSize;
-using PointF = CoreGraphics.CGPoint;
+using MapKit;
using ObjCRuntime;
-
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-using MonoTouch.ObjCRuntime;
-#endif
+using UIKit;
+using Xamarin.Forms.Platform.iOS;
+using RectangleF = CoreGraphics.CGRect;
namespace Xamarin.Forms.Maps.iOS
{
@@ -44,11 +26,7 @@ namespace Xamarin.Forms.Maps.iOS
_map = map;
}
-#if __UNIFIED__
public override MKAnnotationView GetViewForAnnotation(MKMapView mapView, IMKAnnotation annotation)
-#else
- public override MKAnnotationView GetViewForAnnotation (MKMapView mapView, NSObject annotation)
-#endif
{
MKPinAnnotationView mapPin = null;
@@ -71,11 +49,7 @@ namespace Xamarin.Forms.Maps.iOS
return mapPin;
}
-#if __UNIFIED__
void AttachGestureToPin(MKPinAnnotationView mapPin, IMKAnnotation annotation)
-#else
- void AttachGestureToPin (MKPinAnnotationView mapPin, NSObject annotation)
-#endif
{
UIGestureRecognizer[] recognizers = mapPin.GestureRecognizers;
@@ -238,11 +212,7 @@ namespace Xamarin.Forms.Maps.iOS
var annotation = new MKPointAnnotation { Title = pin.Label, Subtitle = pin.Address ?? "" };
pin.Id = annotation;
-#if __UNIFIED__
annotation.SetCoordinate(new CLLocationCoordinate2D(pin.Position.Latitude, pin.Position.Longitude));
-#else
- annotation.Coordinate = new CLLocationCoordinate2D (pin.Position.Latitude, pin.Position.Longitude);
-#endif
((MKMapView)Control).AddAnnotation(annotation);
}
}
@@ -293,11 +263,7 @@ namespace Xamarin.Forms.Maps.iOS
void RemovePins(IList pins)
{
foreach (object pin in pins)
-#if __UNIFIED__
((MKMapView)Control).RemoveAnnotation((IMKAnnotation)((Pin)pin).Id);
-#else
- ((MKMapView)Control).RemoveAnnotation ((NSObject)((Pin)pin).Id);
-#endif
}
void UpdateHasScrollEnabled()