mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
[CustomCollectionView Example]
Issue (#1366): CustomColelctionView example app always returns YES from shouldInvalidateLayoutForBoundsChange: which triggers a re-layout. Fix: Comparing CGSize rather than CGRect is enough to handle rotation support without always triggering a re-layout. .
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
|
||||
- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds
|
||||
{
|
||||
if (!CGRectEqualToRect(self.collectionView.bounds, newBounds)) {
|
||||
if (!CGSizeEqualToSize(self.collectionView.bounds.size, newBounds.size)) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
|
||||
Reference in New Issue
Block a user