Binding 如何绑定属性块monotouch

Binding 如何绑定属性块monotouch,binding,xamarin.ios,Binding,Xamarin.ios,我正在学习如何将objective c绑定到MonotTouch,而我在一个块属性上遇到了问题 @property (nonatomic, copy) void (^onLongPress)(UIView*, NSInteger); 我现在有这个 delegate void onLongPress (UIView view, int index); [Export ("onLongPress")] void onLongPress() { set; } 关于如何绑定块的文档见3.10 但

我正在学习如何将objective c绑定到MonotTouch,而我在一个块属性上遇到了问题

@property (nonatomic, copy) void (^onLongPress)(UIView*, NSInteger);
我现在有这个

delegate void onLongPress (UIView view, int index);
[Export ("onLongPress")]
void onLongPress() {  set;  }

关于如何绑定块的文档见3.10

但您的代码显示的是块属性,而不是接受属性的函数

在你的情况下,我会这样装订:

//ApiDefinition.cs
delegate void OnLongPress (UIView view, int index)

[Export("onLongPress")]
OnLongPress OnLongPress { set;}
这可能会奏效,但由于我从未遇到过这种特殊情况,我对您的结果感兴趣