mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +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
|
- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds
|
||||||
{
|
{
|
||||||
if (!CGRectEqualToRect(self.collectionView.bounds, newBounds)) {
|
if (!CGSizeEqualToSize(self.collectionView.bounds.size, newBounds.size)) {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
|
|||||||
Reference in New Issue
Block a user