开发者

Help binding a static objective-c library in monotouch

开发者 https://www.devze.com 2023-02-26 06:44 出处:网络
I need help binding a static Obj-开发者_C百科c library I created for use from within MonoTouch, using btouch.

I need help binding a static Obj-开发者_C百科c library I created for use from within MonoTouch, using btouch.

I know the basic syntax when creating the API files, but I have functions in my library that I simply can't find the right way to bind :S

Here's how my header looks like:

- (UIImage*) functionSampleOne:(CGImageRef)srcCGImage;
- (UIImage*) functionSampleTwo:(CGImageRef)srcCGImage;
CGImageRef functionSampleThree(CGImageRef image);

What would the btouch api for this header look like? How do I bind UIImage* and CGImageRef?


Just like any other object:

[Export("functionSampleOne:")]
UIImage FunctionSampleOne(CGImage srcImage);

Don't forget to add the appropriate namespaces in the API definition file:

using MonoTouch.UIKit;
using MonoTouch.CoreGraphics;
0

精彩评论

暂无评论...
验证码 换一张
取 消