Skip to content

Commit

Permalink
Update ScrollViewHandler.iOS.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
kubaflo committed Jan 5, 2025
1 parent 1d2a7a6 commit 01d5d65
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Core/src/Handlers/ScrollView/ScrollViewHandler.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using CoreGraphics;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Layouts;
using Microsoft.Maui.Primitives;
using UIKit;

namespace Microsoft.Maui.Handlers
Expand Down Expand Up @@ -185,6 +186,16 @@ static Size MeasureContent(IContentView contentView, Thickness inset, double wid

var contentSize = Size.Zero;

if (widthConstraint != double.PositiveInfinity && Dimension.IsExplicitSet(contentView.Width))
{
widthConstraint = contentView.Width;
}

if (heightConstraint != double.PositiveInfinity && Dimension.IsExplicitSet(contentView.Height))
{
heightConstraint = contentView.Height;
}

if (content != null)
{
contentSize = content.Measure(widthConstraint - inset.HorizontalThickness,
Expand Down

0 comments on commit 01d5d65

Please sign in to comment.