我需要一个iOS渲染器的等效事件:
public class MyMapRenderer : Xamarin.Forms.Maps.Android.MapRenderer
{
...
protected override void OnMapReady(GoogleMap map)
{
base.OnMapReady(map);
// need to do things here
}
...
}
谢谢
答案 0 :(得分:0)
您可以使用MKMapViewDelegate_MapLoaded在iOS渲染器中处理您的操作:
public class CustomMapRenderer : MapRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<View> e)
{
base.OnElementChanged(e);
var nativeMap = Control as MKMapView;
nativeMap.MapLoaded += NativeMap_MapLoaded;
}
private void NativeMap_MapLoaded(object sender, EventArgs e)
{
Console.WriteLine("NativeMap_MapLoaded");
}
}