2
我在靜態庫-(NSArray*)SetImage:(UIImage *)OcrImage;
中有方法。在MonoTouch中綁定NSArray
我必須在MonoTouch的這種方法結合爲
NSArray [] SetImage(UIImage OcrImage);
,當我在MonoTouch的類嘗試使用方法
NSArray[] wordArray=test.SetImage(this.imgSnapshot.Image);
但應用程序崩潰,當我調用該方法。
崩潰日誌
System.InvalidCastException: Cannot cast from source type to destination type.
at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass (object,intptr)
at MonoTouch.Foundation.NSArray.ArrayFromHandle[NSArray] (IntPtr handle) [0x0003a] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSArray.cs