0
我想要一個Objective-C庫Xamarin目的記號筆綁定代理以進行界面
@protocol PKTokenFieldDelegate <UITextFieldDelegate>
-(void)tokenShouldChangeHeight:(CGFloat)height;
@optional
-(void)tokenFieldDidSelectToken:(PKToken*)token;
-(void)tokenFieldDidBeginEditing:(PKTokenField*)tokenField;
-(void)tokenFieldDidEndEditing:(PKTokenField*)tokenField;
@end
記號筆輸出基於xamarin開發者網站的演練綁定的委託。
// @protocol PKTokenFieldDelegate <UITextFieldDelegate>
[BaseType (typeof (NSObject))]
[Model]
interface PKTokenFieldDelegate : IUITextFieldDelegate
{
// @required -(void)tokenShouldChangeHeight:(CGFloat)height;
[Abstract]
[Export ("tokenShouldChangeHeight:")]
void TokenShouldChangeHeight (nfloat height);
// @optional -(void)tokenFieldDidSelectToken:(PKToken *)token;
[Export ("tokenFieldDidSelectToken:")]
void TokenFieldDidSelectToken (PKToken token);
// @optional -(void)tokenFieldDidBeginEditing:(PKTokenField *)tokenField;
[Export ("tokenFieldDidBeginEditing:")]
void TokenFieldDidBeginEditing (PKTokenField tokenField);
// @optional -(void)tokenFieldDidEndEditing:(PKTokenField *)tokenField;
[Export ("tokenFieldDidEndEditing:")]
void TokenFieldDidEndEditing (PKTokenField tokenField);
}
這隻創建一個對象,我可以繼承而不是創建一個接口。我需要把它作爲一個接口。我錯過了什麼?
感謝