Bug 46113 - MKMapView's API delegate binding mess (naming inconsistencies)
Summary: MKMapView's API delegate binding mess (naming inconsistencies)
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: XI 10.2 (iOS 10.1)
Hardware: Macintosh Mac OS
: Low enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
Depends on:
Reported: 2016-10-28 08:31 UTC by Boris Spinner
Modified: 2016-10-30 17:58 UTC (History)
3 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Boris Spinner 2016-10-28 08:31:27 UTC
I've stumbled over some API inconsistencies or weirdness.

Take a look at e.g. https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.GetViewForAnnotation/.
The property currently isn't useful, since you can't set a delegate (opposing to the doc's remarks).
All you can do is set a *single* annotationView instance.
I guess this is due to some auto generator stuff?

Same here: https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.GetViewForOverlay/

Here it was done as expected/correctly: https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.OverlayRenderer/

# Relevant API docs
## Apple

## Xamarin
Comment 1 Vincent Dondain [MSFT] 2016-10-30 17:58:07 UTC
Hi Boris,

So MKMapViewAnnotation, MKRendererForOverlayDelegate and MKMapViewOverlay are all delegates.

If you do:

MKMapViewAnnotation a;
MKRendererForOverlayDelegate b;
MKMapViewOverlay c;

and go to declaration you'll see.

So the property you're referring to (https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.GetViewForAnnotation/) is actually taking a delegate not "a single annotationView instance".

Now I do concede that there are some *naming inconstancies* but everything is working as expected.

The delegates should all have "Delegate" in their name, so I'll leave the bug open set as low enhancement (since it's a breaking change) so we can fix the naming issues.

Note You need to log in before you can comment on or make changes to this bug.