MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _layoutCell

Method _layoutCell

packages/core/ui/list-view/index.ios.ts:776–788  ·  view source on GitHub ↗
(cellView: View, indexPath: NSIndexPath)

Source from the content-addressed store, hash-verified

774 }
775
776 private _layoutCell(cellView: View, indexPath: NSIndexPath): number {
777 if (cellView) {
778 const rowHeight = this._effectiveRowHeight;
779 const heightMeasureSpec: number = rowHeight >= 0 ? layout.makeMeasureSpec(rowHeight, layout.EXACTLY) : infinity;
780 const measuredSize = View.measureChild(this, cellView, this.widthMeasureSpec, heightMeasureSpec);
781 const height = measuredSize.measuredHeight;
782 this.setHeight(indexPath.row, height);
783
784 return height;
785 }
786
787 return this.nativeViewProtected.estimatedRowHeight;
788 }
789
790 public _prepareCell(cell: ListViewCell, indexPath: NSIndexPath): number {
791 let cellHeight: number;

Callers 1

_prepareCellMethod · 0.95

Calls 2

setHeightMethod · 0.95
measureChildMethod · 0.45

Tested by

no test coverage detected