我有以下Obj-C .h,正确的绑定方法是什么?
@interface iSmart : NSObject<EAAccessoryDelegate>{
id<iSmartDelegate> delegate;
}
@property(nonatomic, assign) id<iSmartDelegate> delegate;
-(id)init;
@end
__________________________________________________________________________________________
@class iSmart;
@protocol iSmartDelegate <NSObject>
-(void) iSmartDidConnect;
-(void) iSmartDidDisconnect;
-(void) cardStatusChanged:(unsigned char)status;
@end
__________________________________________________________________________________________
在这一刻,我有这个协议和接口:
[BaseType (typeof(NSObject))]
[Model]
interface iSmartDelegate
{
[Export("iSmartDidConnect")]
void iSmartDidConnect();
[Export("iSmartDidDisconnect")]
void iSmartDidDisconnect();
[Export("cardStatusChanged:")]
void CardStatusChanged(Byte status);
}
[BaseType (typeof (EAAccessoryDelegate),
Delegates=new string [] { "WeakDelegate" },
Events=new Type [] { typeof (iSmartDelegate)})]
interface iSmart
{
//@property(nonatomic, assign) id<iSmartDelegate> delegate;
[Export("delegate"), NullAllowed]
NSObject WeakDelegate { get; set; }
[Wrap("WeakDelegate")]
iSmartDelegate Delegate { get; set; }
//-(id)init;
[Export("init")]
NSObject init();
}
当我尝试在 Xamarin Studio 错误 BI0000 中构建项目时出现此错误:意外错误 - 请在http://bugzilla.xamarin.com (BI0000)提交错误报告
谢谢