Does anybody know how to subclass a UICollectionView
in Xamarin.iOS?
I tried this
public class MyCustomUICollectionView : UICollectionView
{
[Export ("initWithFrame:")]
public InfinitiveScrollingUICollectionView (CGRect frame) : base(frame)
{
// initialization
}
}
but I get
The best overloaded method match for
UIKit.UICollectionView.UICollection(Foundation.NSCoder) has some invalid arguments Argument #1 cannot convert
CoreGraphics.CGRectexpression to type
Foundation.NSCoder`.
I also tried to use public InfinitiveScrollingUICollectionView ()
but I get
The type
UIKit.UICollectionView
does not contain a constructor that takes '0' arguments
I want to override LayoutSubviews
. Or should the UICollectionViewController
be used for such a purpose?