Does this class inherit from UIView?
If yes, the NSCoder constructor should be like this:
[Export("initWithCoder:")]
public MyWhatsit(NSCoder coder) : base(coder)
BUT, if the view is not loaded from a XIB, the only constructor you "need" is:
public MyWhatsit(IntPtr handle) : base(handle)
Dimitris Tavlikos
Software Developer
Email: [email protected]
Twitter: @dtavlikos
Blog: http://software.tavlikos.com
On May 23, 2011, at 5:06 PM, Michael Brian Bentley wrote:
> This ought to easy but I just worked through the night...
>
> The app runs on the simulator, calling one version of a constructor for a
> class
>
> public MyWhatsit( IntPtr handle)
>
> The app does not work on the device; it is complaining that it can't
> find the initWithCoder: version. I have one defined, public
> MyWhatsit(NSCoder coder), so I'm not sure what it is actually telling
> me.
>
> -Mike
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch