mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Don't set cell node frames during measure, set them just before returning the cell size to UITableView/UICollectionView
This commit is contained in:
@@ -423,7 +423,12 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return [[_dataController nodeAtIndexPath:indexPath] calculatedSize];
|
||||
ASCellNode *node = [_dataController nodeAtIndexPath:indexPath];
|
||||
CGSize size = node.calculatedSize;
|
||||
if (!CGSizeEqualToSize(size, node.frame.size)) {
|
||||
node.frame = CGRectMake(0, 0, size.width, size.height);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
|
||||
|
||||
Reference in New Issue
Block a user