-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Wrong sizing of layouts #9825
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Is this why RowDefinition sizes and Border.Shadow don't appear to be adhered to on iOS? For example, this Layout looks so much different on iOS. In fact, there are so many problems that it is unusable on iOS. |
+1! I often load dynamic content into stacklayouts (or now verticalstacklayouts) wrapped into scrollviews. On ios I can’t scroll to the bottom of those after the height increased due to updated content. This is very severe as it can hide important content. |
Workaround that works for me is:
and calling
after the content has updated. |
@borrmann How do you call scrollView.Content after the content / page has updated? What method are you overriding? Thanks! |
I do it like this
and in XAML
But again, for me this works only on pages where I load content once at the beginning. |
@borrmann Unfortunately, this didn't fix the RowDefinition sizes and Border.Shadow issues. :( |
I have this problem too |
was posted as a workaround in issue #8820 |
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Can repro on iOS platform with sample project. iOSWrongSizing |
Still an issue on 8.0.70 |
Description
Hi, I found out that layouts do not react to size changes of their children correctly on iOS. Let's have this quite simple layout:
On button click, the label with the text "Label with variable width" changes its width from 100 to 200 (and vice versa) - see code behind:
Examples
Here are examples of how clicking the button behaves on different platforms:
Android.example.mp4
Windows.example.mp4
iOS.example.1.mp4
As you can see, it behaves as expected on Windows and Android (containers adjust to the size changes of their content), but on iOS it is completely wrong (containers do not adjust at all). The label with the text "Label with variable width" is also clipped from the bottom, which it should not be.
If I remove the ScrollView from the layout:
iOS.example.2.mp4
Containers adjust to the wider label, but then it does not shrink back down.
If I remove the red BoxView too:
iOS.example.3.mp4
The required behavior is almost there but not entirely - the label is still clipped from the bottom.
The problem is probably present on the macOS version too, but I have not had an opportunity to test it there yet.
I hope my description of the problem is clear. If not, feel free to ask 🙂
Steps to Reproduce
Download the reproduction project, run it, and click the button a few times. You will see the behavior described above.
Link to public reproduction project repository
https://github.com/RadekVyM/MauiBugs/tree/main/iOSWrongSizing
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: