[MonoTouch] MKMapView

Michael Hutchinson m.j.hutchinson at gmail.com
Thu Aug 6 13:46:30 EDT 2009


On Thu, Aug 6, 2009 at 12:52 PM, Romulo Mendivil<wammy21 at gmail.com> wrote:
> Good Morning everyone.
>
> I actually found this last night, figured maybe someone will run into
> this also.
>
> When you create a MKMapView with Interface builder and expose it as an
> output, the MainWindow.xib.designer.cs places it as a
> MonoTouch.UIKit.MKMapView and when you build it says:
>
> The type or namespace name `MKMapView' does not exist in the namespace
> `MonoTouch.UIKit'. Are you missing an assembly reference?(CS0234)
>
> Code:
>
> [MonoTouch.Foundation.Connect("MapView")]
> protected MonoTouch.UIKit.MKMapView MapView {
>        get {
>                return ((MonoTouch.UIKit.MKMapView)(this.GetNativeField("MapView")));
>        }
>        set {
>                this.SetNativeField("MapView", value);
>        }
> }
>
> If you change MonoTouch.UIKit.MKMapView to MonoTouch.MapKit.MKMapView
> the solution builds correctly.
>
> Hope this helps someone.

Thanks!

I've fixed the generator in SVN r139514.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the MonoTouch mailing list