question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Elements in same layout doesn't response IsVisible changes [iOS][Mac]

See original GitHub issue

Description

When an element’s IsVisible property is changed, other elements’ position doesn’t change, they stay in the same position.

Let me explain with following gifs. When I try the same scenario in Windows or Android, everything works great. But it doesn’t work as expected on iOS and MacOS.

✅ Works fine:

Windows Android
windows-demo android-demo

❌ Doesn’t work as expected:

iOS MacOS
ios-demo macos-demo

Steps to Reproduce

  1. Create a new project.
  2. Add 2 elements in the same stacklayout and set a name for the first one.
  3. Add a button to the page and set the first element’s IsVisible as false.
  4. You’ll see, the second element won’t go up and stay at the same position.

You can try the opposite, initialize the first element with IsVisible as false and set IsVisible as true via button. You’ll see the second element will be rendered on the first element.


Also, I have a repository for my complex situation, you can clone and run SandboxTreeView project to reproduce the issue.

https://github.com/enisn/TreeView.Maui

Version with bug

6.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

iOS 15.4

Did you find any workaround?

Unfortunetely.

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
AidarNurmukhametovcommented, May 27, 2022

Hello, we are developing DevExpress .NET MAUI controls and experienced the same issue. It has a High priority for us and we do not have a workaround. Thank you for your help

1reaction
AidarNurmukhametovcommented, Jul 27, 2022

@AidarNurmukhametov did you find a workaround?

@enisn No, I don’t. Temporary solution was to use another layout, I don’t consider that a workaround, result is not the same

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't seem to make auto layout work right
So I have a Split View controller for my app. The Master View Controller does not want to layout correctly in different sizes,...
Read more >
Layout | Apple Developer Documentation
Design a consistent layout that adapts gracefully to context changes, while displaying the same content as much as possible.
Read more >
How to use Auto Layout to move other views when a ...
UIStackView repositions its views automatically when the hidden property is changed on any of its subviews (iOS 9+). UIView.
Read more >
Troubleshooting Layout Issues
Are you having layout issues? These are the most common issues, causes, and solutions available. Changes Do Not Appear Online. These are issues...
Read more >
macOS Ventura: 50 New Features and Changes Worth ...
Apple today released macOS Ventura, the latest version of the company's Mac operating system. macOS Ventura is a significant update that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found