Это возможно. Существует простой способ установить Frame
из Дополнительный вид и добавить UIEdgeInsets
слева от SectionInset .
Код, как показано ниже:
flowLayout = new UICollectionViewFlowLayout (){
HeaderReferenceSize = new CGSize(50, 50),
SectionInset = new UIEdgeInsets (20,65,20,20),
ScrollDirection = UICollectionViewScrollDirection.Vertical,
MinimumInteritemSpacing = 10, // minimum spacing between cells
MinimumLineSpacing = 10 // minimum spacing between rows if ScrollDirection is Vertical or between columns if Horizontal
};
Пользовательский UICollectionReusableView класс:
public class Header : UICollectionReusableView
{
UILabel label;
public string Text {
get {
return label.Text;
}
set {
label.Text = value;
SetNeedsDisplay ();
}
}
[Export ("initWithFrame:")]
public Header (CGRect frame) : base (frame)
{
BackgroundColor = UIColor.Red;
label = new UILabel (){Frame = new CGRect (0,80,50,500), BackgroundColor = UIColor.Yellow};
label.Lines = 5;
AddSubview(label);
}
}
Эффект:

Выше код на основе этого официального образца для изменения.