Stackoverflow question https://stackoverflow.com/a/13555814/1678391 was answered about setting variable sized cells in a UICollectionViewController. I'm trying to figure out how to do this with a UICollectionView object contained in a UIViewController. GetSizeForItem is what I need but don't see where to get it.
My implementation adds a UICollectionView to my UIViewController via Xcode. In my code I'm doing the following;
public partial class CustomViewController : UIViewController
{
public override void ViewDidLoad()
{
collectionView.RegisterClassForCell(typeof(MyCell), cellId);
}
public override void ViewWillAppear(bool animated)
{
collectionView.Source = new CollectionViewSource(items, cellId);
}
class CollectionViewSource : UICollectionViewSource
{
}
class MyCell : UICollectionViewCell
{
}
}