fix UICollectionView estimateItemSize crash in iOS9
if ([self.delegate respondsToSelector:@selector(mlnuiCollectionViewAutoFitSizeForCell:indexPath:)]) {
CGSize size = [self.delegate mlnuiCollectionViewAutoFitSizeForCell:self indexPath:layoutAttributes.indexPath];
CGRect frame = attribute.frame;
+ if (@available(iOS 10, *)) {
frame.size = size;
+ } else {
+ frame.size = CGSizeMake(ceil(size.width), ceil(size.height));
+ }
attribute.frame = frame;
}
return attribute;
