Hello,
I am encountering a UI layout issue on iOS 26 where UITabBar items become squashed or overlapping during device rotation (from Portrait to Landscape). This glitch occurs specifically when a custom UITabBarAppearance is applied.
1. "Liquid Glass" and UITabBar Customization
According to TN3106, Apple states:
"Starting in iOS 26, reduce your use of custom backgrounds in navigation elements and controls. While the techniques in this document remain valid for iOS 18 and earlier, prefer to remove custom effects and let the system determine the navigation bar background appearance. Any custom backgrounds and appearances you use in the navigation bar might overlay or interfere with Liquid Glass or other effects that the system provides, such as the scroll edge effect."
Does this guidance also apply to UITabBar?
Specifically, could setting a custom background color via UITabBarAppearance interfere with internal layout constraints required for the Liquid Glass effect to adapt correctly during orientation changes?
It appears that the internal UIStackView may fail to recalculate width in time when these system effects are active.
2. Validation of the Layout Workaround
To maintain our app's visual identity while resolving this squashing issue, I implemented the following fix within the transition coordinator of my UITabBarController:
Code Implementation (Objective-C)
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
// Forcing a layout refresh to synchronize with the rotation animation
[weakSelf.tabBar invalidateIntrinsicContentSize];
[weakSelf.tabBar setNeedsLayout];
[weakSelf.tabBar layoutIfNeeded];
} completion:nil];
Is manually invalidating the intrinsic content size an acceptable practice for iOS 26?
Or is there a more "system-native" approach to ensure UITabBar layout remains stable and compatible with Liquid Glass, especially when custom appearances are necessary?
1
0
75