Quantcast

Does UILongPressGestureRecognizer(Action<UILongPressGestureRecognizer>) constructor exist?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Does UILongPressGestureRecognizer(Action<UILongPressGestureRecognizer>) constructor exist?

Eric J. M. Smith
Greetings,

This is a small problem, but I'm wondering whether it's a documentation issue or an SDK version issue.  Using MonoTouch 5.2.10.

I'm trying to construct a UILongPressGestureRecognizer, and the documentation (from http://docs.go-mono.com) indicates that this class has a constructor which takes an Action<UILongPressGestureRecognizer> argument.  However, when I try to pass a delegate to the constructor, the compiler complains that the delegate can't be cast to an NSCoder.  Furthermore, MonoDevelop's intellisense doesn't offer the Action-based constructor (or for that matter, the NSAction-based constructor).

All the sample code for UIGestureRecognizers seems to use the (NSObject, Selector) version of the constructor.  I can certainly use that version of the constructor, but the Action-based one seems more C#-ish.  Any reason why it would be unavailable in 5.2.10?

Thanks,

Eric Smith
Tarkvara Design Inc.
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Does UILongPressGestureRecognizer(Action<UILongPressGestureRecognizer>) constructor exist?

René Ruppert
I'm seeing the same problem here. It worked with MT 5.3 but with 5.2 (after
downgrade) the autocomplete still proposes the NSAction constructor but
compiling will fail.

René

-----Ursprüngliche Nachricht-----
Von: [hidden email]
[mailto:[hidden email]] Im Auftrag von Eric J. M. Smith
Gesendet: Samstag, 14. April 2012 19:05
An: [hidden email]
Betreff: [MonoTouch] Does
UILongPressGestureRecognizer(Action<UILongPressGestureRecognizer>)
constructor exist?

Greetings,

This is a small problem, but I'm wondering whether it's a documentation
issue or an SDK version issue.  Using MonoTouch 5.2.10.

I'm trying to construct a UILongPressGestureRecognizer, and the
documentation (from http://docs.go-mono.com) indicates that this class has a
constructor which takes an Action<UILongPressGestureRecognizer> argument.
However, when I try to pass a delegate to the constructor, the compiler
complains that the delegate can't be cast to an NSCoder.  Furthermore,
MonoDevelop's intellisense doesn't offer the Action-based constructor (or
for that matter, the NSAction-based constructor).

All the sample code for UIGestureRecognizers seems to use the (NSObject,
Selector) version of the constructor.  I can certainly use that version of
the constructor, but the Action-based one seems more C#-ish.  Any reason why
it would be unavailable in 5.2.10?

Thanks,

Eric Smith
Tarkvara Design Inc.
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Loading...