Skip to content

fix(iOS, Tabs): Request layout pass after loading image from source#3596

Merged
t0maboro merged 7 commits intomainfrom
@t0maboro/update-tab-bar-item-layout-for-image-from-source
Feb 2, 2026
Merged

fix(iOS, Tabs): Request layout pass after loading image from source#3596
t0maboro merged 7 commits intomainfrom
@t0maboro/update-tab-bar-item-layout-for-image-from-source

Conversation

@t0maboro
Copy link
Contributor

@t0maboro t0maboro commented Jan 30, 2026

Description

Before assigning the image, the tab bar might already be attached to the view hierarchy. This can cause an issue where the tab bar layout is not correctly updated, as it might have been added to the window before the image was set. As a result, the layout adjustments (e.g., image positioning) are not applied immediately.

To resolve this, we explicitly request an additional layout pass after the image is assigned. This ensures that the tab bar updates its layout properly without requiring user interaction (e.g., switching tabs) to trigger a recalculation.

The issue is illustrated in the image below.

before-image

Changes

  • Add layout request in the completion callback when the image is loaded from source.
  • Add example & assets demonstrating the issue.

Before & after - visual documentation

Before After
before.mov
after.mov

Test plan

Added Test3596, performed regression testing on TestBottomTabs

Checklist

  • Included code example that can be used to test this change.
  • Updated / created local changelog entries in relevant test files.
  • For visual changes, included screenshots / GIFs / recordings documenting the change.
  • For API changes, updated relevant public types.
  • Ensured that CI passes

@t0maboro t0maboro marked this pull request as ready for review February 2, 2026 09:20
@t0maboro t0maboro requested a review from kkafar February 2, 2026 09:20
@t0maboro t0maboro changed the title WIP - Request layout pass after loading image from source fix(iOS, Tabs): Request layout pass after loading image from source Feb 2, 2026
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
@t0maboro t0maboro merged commit da6c4d7 into main Feb 2, 2026
6 checks passed
@t0maboro t0maboro deleted the @t0maboro/update-tab-bar-item-layout-for-image-from-source branch February 2, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants