@nativescript-community/ui-collectionview 5.3.15 → 5.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/angular/esm2022/collectionview-comp.mjs +10 -9
- package/angular/esm2022/index.mjs +2 -2
- package/angular/fesm2022/nativescript-community-ui-collectionview-angular.mjs +8 -7
- package/angular/fesm2022/nativescript-community-ui-collectionview-angular.mjs.map +1 -1
- package/index-common.d.ts +4 -4
- package/index-common.js +5 -6
- package/index-common.js.map +1 -1
- package/index.android.js +1 -1
- package/index.android.js.map +1 -1
- package/index.ios.d.ts +1 -0
- package/index.ios.js +8 -1
- package/index.ios.js.map +1 -1
- package/package.json +2 -10
- package/react/index.d.ts +1 -1
- package/react/index.js +1 -3
- package/react/index.js.map +1 -1
- package/svelte/index.js +2 -2
- package/svelte/index.js.map +1 -1
- package/vue/component.js +0 -1
- package/vue/component.js.map +1 -1
- package/vue/index.js.map +1 -1
- package/vue3/component.d.ts +1 -1
- package/vue3/component.js +2 -3
- package/vue3/component.js.map +1 -1
- package/vue3/index.js.map +1 -1
- package/platforms/ios/src/Info.plist +0 -0
- package/platforms/ios/src/NSCollectionView.h +0 -2
- package/platforms/ios/src/UICollectionViewCacheDelegateFlowLayout.h +0 -6
- package/platforms/ios/src/UICollectionViewCacheDelegateFlowLayout.m +0 -36
- package/platforms/ios/src/module.modulemap +0 -5
@@ -1,36 +0,0 @@
|
|
1
|
-
#import "UICollectionViewCacheDelegateFlowLayout.h"
|
2
|
-
|
3
|
-
@implementation UICollectionViewCacheDelegateFlowLayout
|
4
|
-
@synthesize cachedSizes;
|
5
|
-
- (instancetype)init
|
6
|
-
{
|
7
|
-
self = [super init];
|
8
|
-
if (self) {
|
9
|
-
self.cachedSizes = [NSMutableArray new];
|
10
|
-
}
|
11
|
-
return self;
|
12
|
-
}
|
13
|
-
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout computedSizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
14
|
-
{
|
15
|
-
return CGSizeZero;
|
16
|
-
}
|
17
|
-
|
18
|
-
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
19
|
-
{
|
20
|
-
NSInteger index = indexPath.row;
|
21
|
-
if (index < [self.cachedSizes count]) {
|
22
|
-
NSValue* value = [self.cachedSizes objectAtIndex:indexPath.row];
|
23
|
-
if (value != nil && !CGSizeEqualToSize([value CGSizeValue], CGSizeZero)) {
|
24
|
-
return [value CGSizeValue];
|
25
|
-
}
|
26
|
-
CGSize size = [self collectionView:collectionView layout:collectionViewLayout computedSizeForItemAtIndexPath:indexPath];
|
27
|
-
[self.cachedSizes replaceObjectAtIndex:indexPath.row withObject:[NSValue valueWithCGSize:size]];
|
28
|
-
return size;
|
29
|
-
} else {
|
30
|
-
CGSize size = [self collectionView:collectionView layout:collectionViewLayout computedSizeForItemAtIndexPath:indexPath];
|
31
|
-
[self.cachedSizes addObject:[NSValue valueWithCGSize:size]];
|
32
|
-
return size;
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
@end
|