@@ -620,7 +620,7 @@ export class Pager extends PagerBase {
620
620
621
621
public onLayout ( left : number , top : number , right : number , bottom : number ) {
622
622
super . onLayout ( left , top , right , bottom ) ;
623
- if ( this . iosOverflowSafeAreaEnabled ) {
623
+ if ( this . iosOverflowSafeArea ) {
624
624
const safeArea = this . getSafeAreaInsets ( ) ;
625
625
this . _effectiveItemHeight += safeArea . top + safeArea . bottom ;
626
626
}
@@ -1106,6 +1106,7 @@ class UICollectionViewDataSourceImpl extends NSObject implements UICollectionVie
1106
1106
// }
1107
1107
1108
1108
// If cell is reused it has old content - remove it first.
1109
+ const firstRender = ! cell . view ;
1109
1110
if ( ! cell . view ) {
1110
1111
cell . owner = new WeakRef ( view ) ;
1111
1112
} else if ( cell . view !== view ) {
@@ -1138,8 +1139,9 @@ class UICollectionViewDataSourceImpl extends NSObject implements UICollectionVie
1138
1139
// }
1139
1140
}
1140
1141
1141
- view . iosOverflowSafeArea = owner . iosOverflowSafeArea ;
1142
- view [ 'iosIgnoreSafeArea' ] = owner [ 'iosIgnoreSafeArea' ] ;
1142
+ if ( firstRender ) {
1143
+ view [ 'iosIgnoreSafeArea' ] = true ;
1144
+ }
1143
1145
owner . _layoutCell ( view , indexPath ) ;
1144
1146
const size = owner . _getSize ( ) ;
1145
1147
const width = Utils . layout . toDevicePixels ( size . width ) ;
@@ -1154,12 +1156,14 @@ class UICollectionViewDataSourceImpl extends NSObject implements UICollectionVie
1154
1156
const template = owner && owner . _getItemTemplate ( indexPath . row ) ;
1155
1157
cell = collectionView . dequeueReusableCellWithReuseIdentifierForIndexPath ( template . key , indexPath ) || PagerCell . initWithEmptyBackground ( ) ;
1156
1158
cell . index = indexPath ;
1159
+ const firstRender = ! cell . view ;
1157
1160
if ( owner ) {
1158
1161
const size = owner . _getSize ( ) ;
1159
1162
owner . _prepareCell ( cell , indexPath ) ;
1160
1163
const cellView : any = ( cell as PagerCell ) . view ;
1161
- cellView . iosOverflowSafeArea = owner . iosOverflowSafeArea ;
1162
- cellView [ 'iosIgnoreSafeArea' ] = owner [ 'iosIgnoreSafeArea' ] ;
1164
+ if ( firstRender ) {
1165
+ cellView [ 'iosIgnoreSafeArea' ] = true ;
1166
+ }
1163
1167
if ( cellView && cellView . isLayoutRequired ) {
1164
1168
View . layoutChild ( owner , cellView , 0 , 0 , Utils . layout . toDevicePixels ( size . width ) , Utils . layout . toDevicePixels ( size . height ) ) ;
1165
1169
}
0 commit comments