UICollectionViewCell dynamic height with autolayout
问题 I am using auto layout with UICollectionViewCell. So the idea is to allow CollectionViewCell to determine it's size based on layouts. All the constraints are set properly but the problem is that I can not calculate it's size for data source method collectionView:layout:sizeForItemAtIndexPath: Ideally I would like to calculate Cell's height doing the following: static MyCell *myCell = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ myCell = [[MyCell alloc] initWithFrame