Skip to content

[iOS] ScrollView does not resize when children are removed from StackLayout at runtime #32221

@Anandh-SF4665

Description

@Anandh-SF4665

Description

On iOS, when using a ScrollView containing a StackLayout, removing child views from the StackLayout at runtime does not cause the ScrollView to recalculate its layout bounds. As a result, the scrollable area remains larger than the actual content, leading to layout issues such as excessive blank space.

Kindly check the sample below for the issue replication:
IssueReplicationSample.zip

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a ScrollView with a StackLayout inside it.
  2. Dynamically add several Label views to the StackLayout at runtime.
  3. Remove one or more Label views from the StackLayout.
  4. Observe that the ScrollView does not shrink or update its bounds accordingly on iOS.

Expected behavior
The ScrollView should automatically resize to fit the updated content size when child views are added or removed from the StackLayout.

Link to public reproduction project repository

No response

Version with bug

9.0.110 SR12

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.40

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-scrollviewScrollViewi/regressionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/iosregressed-in-9.0.50s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions