-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Check if tab bar hidden value actually changed for Shell #31149
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an infinite loop issue in iOS 26 where setting the TabBarHidden property triggers ViewWillLayoutSubviews, which in turn calls UpdateTabBarHidden() again. The fix adds a simple value comparison check to prevent unnecessary property updates when the value hasn't actually changed.
- Adds early return when
TabBarHiddenalready matches the desired state - Prevents infinite loop by avoiding redundant property assignments
- Applied broadly rather than iOS 26-specific for general defensive programming
Comments suppressed due to low confidence (1)
|
/backport main |
|
/backport to main |
|
Started backporting to main: https://github.com/dotnet/maui/actions/runs/16966624735 |
|
/backport to release/9.0.1xx-sr8 |
|
Started backporting to release/9.0.1xx-sr8: https://github.com/dotnet/maui/actions/runs/17976094094 |
Description of Change
Adds a check to see if the value is actually different and only apply the change when it is different. It seems that for iOS 26 a change has been made that setting the
TabBarHiddenproperty now causesViewWillLayoutSubviewsto be triggered, which in turns updates theTabBarHiddencausing an infinite loop. This change prevents that.Since its a good thing to check anyway, not making this specific to iOS 26, although we could to be on the safe side