Jam*_*rke 3 xamarin.ios xamarin
我正在尝试构建一个使用Cordova库的xamarin应用程序.我一直在为我需要的库的组件进行自己的绑定,到目前为止,它一直运行良好.
今天我遇到了一个有趣的问题.我试图webView: shouldStartLoadWithRequest:在CDVViewContainer 这里覆盖可用的方法.
我查看了Xamarin绑定指南和Xamarin 高级绑定指南.这两个都注意到协议类似于接口,并且如高级绑定指南中所示
@interface UITextField : UIControl <UITextInput> {
}
Run Code Online (Sandbox Code Playgroud)
会翻译成
[BaseType (typeof (UIControl))]
interface UITextField : UITextInput {
}
Run Code Online (Sandbox Code Playgroud)
基于此,我翻译了
@interface CDVViewController : UIViewController <UIWebViewDelegate, CDVScreenOrientationDelegate>{
}
Run Code Online (Sandbox Code Playgroud)
成
[BaseType (typeof (UIViewController))]
interface CDVViewController : UIWebViewDelegate {
}
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试制作我的绑定库时,我得到了
Cordova.cs(26,39): error CS0527L Type `MonoTouch.UIKit.UIWebViewDelegate' in interface list is not an interface.
Run Code Online (Sandbox Code Playgroud)
我检查了Apple规范,这实际上是一个协议.任何人都可以帮我弄清楚我做错了什么?
| 归档时间: |
|
| 查看次数: |
1373 次 |
| 最近记录: |