我假设 CGPDFDocumentRef 应该绑定到 CGPDFDocument
我正在尝试以下
//- (id)initWithPDFDocument:(CGPDFDocumentRef)_document filepath:(NSString *)fullFilePath;
[Export("initWithPDFDocument:filepath:")]
IntPtr Constructor (CGPDFDocument document, string path);
我还包括:
using MonoTouch.CoreGraphics;
当我尝试编译绑定项目时,出现以下错误:
: error BI1002: btouch: Unknown kind MonoTouch.CoreGraphics.CGPDFDocument document in method 'pdftest.ReaderDocument.Constructor'
编辑:
从 poupou 输入后,我有以下内容:
[BaseType (typeof (NSObject))]
partial interface ReaderDocument {
[Export("initWithPDFDocument:filepath:")]
[Internal] IntPtr Constructor (IntPtr document, string path);
并且在 extras.cs 中:
public partial class ReaderDocument {
public ReaderDocument (CGPDFDocument doc, string path) : this (doc.Handle, path) { }
}
我可以在 MonoDevelop 中构建绑定项目,但在 btouch 中出现以下错误。我正在使用命令“/Developer/MonoTouch/usr/bin/btouch MyBindingLib.cs -s:extras.cs”
MyBindingLib.cs(12,19): error CS0260: Missing partial modifier on declaration
of type `mybindingtest.ReaderDocument'. Another partial declaration of this type
exists
extras.cs(6,30): (Location of the symbol related to previous error)
extras.cs(6,30): error CS0261: Partial declarations of `mybindingtest.ReaderDocument'
must be all classes, all structs or all interfaces