【发布时间】:2013-09-26 10:49:57
【问题描述】:
我正在尝试做一个绑定项目,但是我不知道如何绑定下一个接口,它实现了三个不同的委托:
@interface Integration : NSObject<NSURLConnectionDelegate, SomeControllerDelegate,
CLLocationManagerDelegate>
{
id<VendorIntegrationDelegate> delegate;
Information *Information;
SomeController * controller;
}
@property(nonatomic,assign) id<VendorIntegrationDelegate> delegate;
@property(nonatomic,strong) Information *Information;
@property(nonatomic,strong) SomeController *controller;
@end
在ApiDefinition.cs中我做了如下绑定,缺少SomeControllerDelegate和CLLocationManagerDelegate的实现:
[BaseType (typeof (NSUrlConnectionDelegate), Delegates=new string [] { "WeakDelegate" },
Events=new Type [] { typeof (VendorIntegrationDelegate)})]
public partial interface Integration
{
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
NSObject WeakDelegate { get; set; }
[Wrap("WeakDelegate")]
VendorIntegrationDelegate Delegate { get; set; }
[Export ("Information", ArgumentSemantic.Retain)]
Information Information { get; set; }
[Export ("controller", ArgumentSemantic.Retain)]
SomeController Controller { get; set; }
}
我在做这个绑定时发现的问题是接口继承了几个类,如何创建这个绑定
【问题讨论】:
标签: ios binding xamarin.ios xamarin