I am trying to get the height and some other attributes from a prototype UICollectionViewCell in my storyboard. I need those values in the ViewDidLoad, so before any cell is rendered.
I found this answer for tableview:
https://stackoverflow.com/a/14127936/2637259
But it doesn't seem to work for a collectionview because I need a indexpath.
I also found this answer which seems to solve the problem: https://stackoverflow.com/a/22761931/2637259
But I don't know how to do that in xamarin.
Can anyone enlighten me please?
Edit: The reason I need to have it at ViewDidLoad (or at least anywhere before the cells are loaded) is a UIWebView I have in the cell. I have a html string to load into the cell. So I made a function to calculate the height of the webview. After all cells are calculated I call CollectionView.ReloadData() to load the cells. In the sizeForItemAtIndexPath I need to check if the height of the cell is less than the height of the cell without the webview plus the calculated height of the webview. If not, I need to return the standard cell size. Else I need to return the cell height without the webview plus the calculated height.