c# - Downcasting a class without adding a new constructor -
good day,
i trying create binding (objectivec)
@interface gpuimageview : uiview <gpuimageinput> { gpuimagerotationmode inputrotation; } by writing in 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); } and "invalidcastexception" when call
gpuimage.gpuimageview filterview = (gpuimage.gpuimageview)this.view; i create constructor uses reflection. right way it?
cheers!
the solution was, rolf bjarne kvinge pointed out, change class type in interface builder gpuimageview. creates class should inherit gpimageview in turn inherits uiview. no need bind addsubview either.
Comments
Post a Comment