In the same header file you have a NIRecyclableView
class that it inherits from UIView
and implements NIRecyclableView
protocol so you might want to return that object instead
@interface NIRecyclableView : UIView <NIRecyclableView>
// Designated initializer.
- (id)initWithReuseIdentifier:(NSString *)reuseIdentifier;
@property (nonatomic, readwrite, copy) NSString* reuseIdentifier;
@end
So the binding of that header would look like this
[BaseType (typeof (NSObject))]
interface NIViewRecycler {
[Export ("dequeueReusableViewWithIdentifier:")]
NIRecyclableView DequeueReusableView (string reuseIdentifier);
[Export ("recycleView:")]
void RecycleView (NIRecyclableView view);
[Export ("removeAllViews")]
void RemoveAllViews ();
}
[Model]
[Protocol]
[BaseType (typeof (NSObject), Name = "NIRecyclableView")]
interface NIRecyclableViewProtocol {
[Export ("reuseIdentifier", ArgumentSemantic.Copy)]
string ReuseIdentifier { get; set; }
[Export ("prepareForReuse")]
void PrepareForReuse ();
}
// Here you would do interface NIRecyclableView : NIRecyclableViewProtocol
// But NIRecyclableView already implements reuseIdentifier
// So you just inline the missing method PrepareForReuse
// and you get the same results
[BaseType (typeof (UIView))]
interface NIRecyclableView {
[Export ("initWithReuseIdentifier:")]
IntPtr Contructor (string reuseIdentifier);
[Export ("reuseIdentifier", ArgumentSemantic.Copy)]
string ReuseIdentifier { get; set; }
[Export ("prepareForReuse")]
void PrepareForReuse ();
}
A protocol is like hey this object also can respond to this objective-c messages if you want, so you can either manually inline them on the interface definition like we did above or NIRecyclableView : NIRecyclableViewProtocol
which in this case we don't have to.
Hope this helps
Alex