Skip to content

Commit 765827d

Browse files
authored
fix ios array and not found nativeTransformer
1 parent b0f40e8 commit 765827d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ui-pager/index.ios.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,18 +1116,15 @@ class UICollectionViewFlowLinearLayoutImpl extends UICollectionViewFlowLayout {
11161116
public layoutAttributesForElementsInRect(rect: CGRect) {
11171117
const owner = this._owner ? this._owner.get() : null;
11181118
const originalLayoutAttribute = super.layoutAttributesForElementsInRect(rect);
1119-
const visibleLayoutAttributes = [];
1119+
const visibleLayoutAttributes = NSMutableArray.alloc().init();
11201120
if (owner && owner.transformers) {
1121-
const transformsArray = owner.transformers
1122-
.split(' ')
1123-
.map((s) => Pager.mRegisteredTransformers[s])
1124-
.filter((s) => !!s);
1121+
const transformsArray = owner.transformers.split(' ');
11251122
if (transformsArray.length) {
11261123
const collectionView = this.collectionView;
11271124
const count = originalLayoutAttribute.count;
11281125
for (let i = 0; i < count; i++) {
11291126
const attributes = originalLayoutAttribute.objectAtIndex(i);
1130-
visibleLayoutAttributes[i] = attributes;
1127+
visibleLayoutAttributes.addObject(attributes);
11311128
for (const transformer of transformsArray) {
11321129
const nativeTransformer = Pager.mRegisteredTransformers[transformer];
11331130
if (nativeTransformer) {

0 commit comments

Comments
 (0)