[MonoTouch] A monotouch wrapper for the Sparrow 2D library

fmuaddib fmuaddib at gmail.com
Thu Feb 17 13:14:52 EST 2011

Great idea, maybe it could be even more simplified thank the obj-c
version thanks to c# predicates. I think that the monotouch platform
is the best for something fast and efficient like sparrow. Managing
iOS graphics in monotouch can be much simplier than in obj-c, like the
Monotouch.Dialog wrapper did for the cocoa interfaces without having
to write dozens of delegates and controllers!!

If you need an hand let me know.

2011/2/6 Miguel de Icaza <miguel at novell.com>:
> Hello,
>> I started the bindings for Sparrow.  It looks like a good API.  The
>> MonoTouch project is the beginnings of the Demo app which works nicely.
>> https://github.com/trustme/Sparrow
> This looks nice!
> May I suggest that in SPEventDispatcher you flag the AddEventListener
> as internal, and expose a method that takes a delegate instead?
> That way users do not have to know about selectors, instances and
> flagging things with [Export], they would do:
> AddEventListener (OnBoundaryChange, "boundaryChange", true);
> The implementation looks like this:
> object AddEventListener (NSAction action, string evenType, bool retain)
> {
>    var dispatcher = new Dispatcher (action);
>    RealAddEventListener (Dispatcher.InvokeSelector, dispatcher,
> eventType, retain);
>    return dispatcher;
> }
> [Register ("__SparrowClassDispatcher")]
> class Dispatcher : NSObject {
>    public static Selector InvokeSelector = new Selector ("invoke");
>    NSAction action;
>    [Export ("invoke")]
>    public Dispatcher (NSAction action) { this.action = action; }
>    [Export ("apply")]
>    [Preserve (Conditional = true)]
>    public void Apply () { action (); }
> }

More information about the MonoTouch mailing list