良い一日、
(ObjectiveC) のバインディングを作成しようとしています
@interface GPUImageView : UIView <GPUImageInput>
{
GPUImageRotationMode inputRotation;
}
これを ApiDefinitions.cs (MonoTouch) に記述して
[BaseType (typeof(UIView))]
interface GPUImageView : GPUImageInput{
[Export ("initWithFrame:")]
IntPtr Constructor(RectangleF frame);
[Export ("autoresizingMask")]
UIViewAutoresizing AutoResizingMask { get; set;}
[Export ("addSubView:")]
void AddSubView(UIView view);
}
そして、私が呼び出すと「InvalidCastException」が発生します
GPUImage.GPUImageView filterView = (GPUImage.GPUImageView)this.View;
リフレクションを使用するコンストラクターを作成できます。しかし、それは本当に正しい方法ですか?
乾杯!