Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</Page.actionBar>

<ScrollView>
<StackLayout>
<StackLayout backgroundColor="teal">
<GridLayout height="30" backgroundColor="red" />
<GridLayout height="30" backgroundColor="yellow" />
<GridLayout height="30" backgroundColor="green" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<GridLayout>
<ScrollView>
<StackLayout>
<StackLayout backgroundColor="teal">
<GridLayout height="30" backgroundColor="red" />
<GridLayout height="30" backgroundColor="yellow" />
<GridLayout height="30" backgroundColor="green" />
Expand Down
10 changes: 4 additions & 6 deletions tns-core-modules/ui/scroll-view/scroll-view.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,14 @@ export class ScrollView extends ScrollViewBase {
nativeView.contentInsetAdjustmentBehavior = 2;
}

let scrollWidth = width;
let scrollHeight = height;
let scrollWidth = width + insets.left + insets.right;
let scrollHeight = height + insets.top + insets.bottom;
if (this.orientation === "horizontal") {
scrollWidth = Math.max(this._contentMeasuredWidth + insets.left + insets.right, width);
scrollHeight = height + insets.top + insets.bottom;
scrollWidth = Math.max(this._contentMeasuredWidth + insets.left + insets.right, scrollWidth);
width = Math.max(this._contentMeasuredWidth, width);
}
else {
scrollHeight = Math.max(this._contentMeasuredHeight + insets.top + insets.bottom, height);
scrollWidth = width + insets.left + insets.right;
scrollHeight = Math.max(this._contentMeasuredHeight + insets.top + insets.bottom, scrollHeight);
height = Math.max(this._contentMeasuredHeight, height);
}

Expand Down