Hi folks,
I'm trying set a simple property on an MKMapView
. I've used IB to 'drop' the MKMapView
onto my .. er.. view (is that the right term?). I then made an outlet
for that MKMapView
(control + drag-click to the .h file).
In my .cs
code, the outlet exists (and it exists also in the .designer file).
So it feels like the xcode <=> xam bridge did it stuff.
[Outlet]
MonoTouch.MapKit.MKMapView MapView { get; set; }
I then have the following code:
public override void ViewDidLoad()
{
LoggingService.Trace("MapViewController ViewDidLoad");
base.ViewDidLoad();
MapView.ShowsUserLocation = true; // Yes, i know I can set this property in IB, also.
....
}
MapView
instance is null, so trying to set a property on that instance, crashes the app.
Also, if I comment out this method:
// public override void LoadView()
// {
// }
I get the following crash: Failed to find selector loadView on blah....
Er.. WTF?
Can anyone at all, help?