mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-08 15:23:12 +00:00
fix crash when typing and deleting on TypingDemoViewController.(beyond array)
This commit is contained in:
parent
fb64cc93d9
commit
9b9d67e1a9
@ -296,6 +296,9 @@
|
|||||||
- (CGSize)collectionView:(UICollectionView *)collectionView
|
- (CGSize)collectionView:(UICollectionView *)collectionView
|
||||||
layout:(UICollectionViewLayout*)collectionViewLayout
|
layout:(UICollectionViewLayout*)collectionViewLayout
|
||||||
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
if (indexPath.row >= letterSizes_.count) {
|
||||||
|
return CGSizeZero;
|
||||||
|
}
|
||||||
NSValue *value = letterSizes_[indexPath.row];
|
NSValue *value = letterSizes_[indexPath.row];
|
||||||
return value.CGSizeValue;
|
return value.CGSizeValue;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user