Open krime81 opened 4 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Can repro this issue at iOS platform on the latest 17.10.2(9.0.0-preview.5.24307.10)
Description
When a ScrollView has dynamic contents ( in this example, a view that is growing in size, or made visible ) it doesnt grow to fit its contents on iOS, but it does on Android
Steps to Reproduce
Create a xaml file with following contents `<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="mauiscrollissue.MainPage">
`
with codebehind : `namespace mauiscrollissue;
public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); }
} `
On tapping the button, -on Android the scrollview grows until it reaches the max height, and then shows the scrolling behavior -on iOS the scrollview doesnt grow and immediately shows scrolling behavior
Link to public reproduction project repository
https://github.com/krime81/mauiscrollissue
Version with bug
9.0.0-preview.1.9973
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
add this handler : ` Microsoft.Maui.Handlers.ScrollViewHandler.Mapper.AppendToMapping(nameof(IScrollView.ContentSize), (h, v) => { var contentSize = h.VirtualView.ContentSize;
note that this might affect other instances of the scrollview in your projects
Relevant log output
No response