Forum Xamarin Xamarin.iOS

Why is setting a delegate to null required?

I am pulling bits and pieces from this tutorial and I got this code that works:

                ImageMapDelegate mapDelegate = new ImageMapDelegate();

                ThreadJourneyMap.Delegate = null;
                ThreadJourneyMap.Delegate = mapDelegate;

But if I remove the

ThreadJourneyMap.Delegate = null;

I get a "Event registration is overwriting existing delegate..." error. Whats up with that?


Sign In or Register to comment.