@@ -275,8 +275,9 @@ export class ListView extends ListViewBase {
275275
276276 _setNativeClipToBounds ( ) {
277277 // Always set clipsToBounds for list-view
278- if ( this . ios ) {
279- this . ios . clipsToBounds = true ;
278+ const view = this . nativeViewProtected ;
279+ if ( view ) {
280+ view . clipsToBounds = true ;
280281 }
281282 }
282283
@@ -286,7 +287,7 @@ export class ListView extends ListViewBase {
286287 if ( this . _isDataDirty ) {
287288 this . refresh ( ) ;
288289 }
289- this . ios . delegate = this . _delegate ;
290+ this . nativeViewProtected . delegate = this . _delegate ;
290291 }
291292
292293 // @ts -ignore
@@ -313,7 +314,7 @@ export class ListView extends ListViewBase {
313314 }
314315
315316 private _scrollToIndex ( index : number , animated = true ) {
316- if ( ! this . ios ) {
317+ if ( ! this . nativeViewProtected ) {
317318 return ;
318319 }
319320
@@ -326,7 +327,7 @@ export class ListView extends ListViewBase {
326327 index = itemsLength - 1 ;
327328 }
328329
329- this . ios . scrollToRowAtIndexPathAtScrollPositionAnimated ( NSIndexPath . indexPathForItemInSection ( index , 0 ) , UITableViewScrollPosition . Top , animated ) ;
330+ this . nativeViewProtected . scrollToRowAtIndexPathAtScrollPositionAnimated ( NSIndexPath . indexPathForItemInSection ( index , 0 ) , UITableViewScrollPosition . Top , animated ) ;
330331 } else if ( Trace . isEnabled ( ) ) {
331332 Trace . write ( `Cannot scroll listview to index ${ index } when listview items not set` , Trace . categories . Binding ) ;
332333 }
@@ -341,7 +342,7 @@ export class ListView extends ListViewBase {
341342 } ) ;
342343
343344 if ( this . isLoaded ) {
344- this . ios . reloadData ( ) ;
345+ this . nativeViewProtected . reloadData ( ) ;
345346 this . requestLayout ( ) ;
346347 this . _isDataDirty = false ;
347348 } else {
@@ -350,7 +351,7 @@ export class ListView extends ListViewBase {
350351 }
351352
352353 public isItemAtIndexVisible ( itemIndex : number ) : boolean {
353- const indexes : NSIndexPath [ ] = Array . from ( this . ios . indexPathsForVisibleRows ) ;
354+ const indexes : NSIndexPath [ ] = Array . from ( this . nativeViewProtected . indexPathsForVisibleRows ) ;
354355
355356 return indexes . some ( ( visIndex ) => visIndex . row === itemIndex ) ;
356357 }
@@ -365,7 +366,7 @@ export class ListView extends ListViewBase {
365366
366367 public _onRowHeightPropertyChanged ( oldValue : CoreTypes . LengthType , newValue : CoreTypes . LengthType ) {
367368 const value = layout . toDeviceIndependentPixels ( this . _effectiveRowHeight ) ;
368- const nativeView = this . ios ;
369+ const nativeView = this . nativeViewProtected ;
369370 if ( value < 0 ) {
370371 nativeView . rowHeight = UITableViewAutomaticDimension ;
371372 nativeView . estimatedRowHeight = DEFAULT_HEIGHT ;
@@ -395,7 +396,7 @@ export class ListView extends ListViewBase {
395396 const changed = this . _setCurrentMeasureSpecs ( widthMeasureSpec , heightMeasureSpec ) ;
396397 super . measure ( widthMeasureSpec , heightMeasureSpec ) ;
397398 if ( changed ) {
398- this . ios . reloadData ( ) ;
399+ this . nativeViewProtected . reloadData ( ) ;
399400 }
400401 }
401402
@@ -432,7 +433,7 @@ export class ListView extends ListViewBase {
432433 return height ;
433434 }
434435
435- return this . ios . estimatedRowHeight ;
436+ return this . nativeViewProtected . estimatedRowHeight ;
436437 }
437438
438439 public _prepareCell ( cell : ListViewCell , indexPath : NSIndexPath ) : number {
@@ -499,10 +500,10 @@ export class ListView extends ListViewBase {
499500 }
500501
501502 [ separatorColorProperty . getDefault ] ( ) : UIColor {
502- return this . ios . separatorColor ;
503+ return this . nativeViewProtected . separatorColor ;
503504 }
504505 [ separatorColorProperty . setNative ] ( value : Color | UIColor ) {
505- this . ios . separatorColor = value instanceof Color ? value . ios : value ;
506+ this . nativeViewProtected . separatorColor = value instanceof Color ? value . ios : value ;
506507 }
507508
508509 [ itemTemplatesProperty . getDefault ] ( ) : KeyedTemplate [ ] {
@@ -512,7 +513,7 @@ export class ListView extends ListViewBase {
512513 this . _itemTemplatesInternal = new Array < KeyedTemplate > ( this . _defaultTemplate ) ;
513514 if ( value ) {
514515 for ( let i = 0 , length = value . length ; i < length ; i ++ ) {
515- this . ios . registerClassForCellReuseIdentifier ( ListViewCell . class ( ) , value [ i ] . key ) ;
516+ this . nativeViewProtected . registerClassForCellReuseIdentifier ( ListViewCell . class ( ) , value [ i ] . key ) ;
516517 }
517518 this . _itemTemplatesInternal = this . _itemTemplatesInternal . concat ( value ) ;
518519 }
@@ -524,7 +525,7 @@ export class ListView extends ListViewBase {
524525 return DEFAULT_HEIGHT ;
525526 }
526527 [ iosEstimatedRowHeightProperty . setNative ] ( value : CoreTypes . LengthType ) {
527- const nativeView = this . ios ;
528+ const nativeView = this . nativeViewProtected ;
528529 const estimatedHeight = Length . toDevicePixels ( value , 0 ) ;
529530 nativeView . estimatedRowHeight = estimatedHeight < 0 ? DEFAULT_HEIGHT : estimatedHeight ;
530531 }
0 commit comments