dotnet / dotnet/maui

iOS Glass UI bottom tabs show truncated labels

Open
#38,147 4 comments 1 reaction 0 assignees View on GitHub
area-controls-tabbedpage partner/syncfusion platform/ios s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

Description

iOS Glass UI tabs show truncated text on initial load.

Root Cause
Tab icon images (PNGs) are loaded via RCTImageLoader, which always dispatches the completion block asynchronously via dispatch_async(dispatch_get_main_queue(), ...) — even for locally-bundled assets. This creates a race condition:

Initial layout: UITabBar renders with text labels but no icons (images still loading)
Async callback fires: tabBarItem.image = image is set one frame later
UIKit doesn't fully recalculate the label positions after the icon is inserted — the text stays at its "pushed down" position or gets truncated
Clicking a tab triggers setSelectedViewController: which forces a full UIKit relayout, correcting everything
Fix
The patch adds [tabBar setNeedsLayout] in the image loading completion block, forcing UIKit to do a complete layout recalculation after each icon image is set. This ensures labels are properly positioned relative to icons from the first render.

Image

After clicking around the tabs, they get into their correct position:

Image

### Steps to Reproduce

_No response_

### Link to public reproduction project repository

_No response_

### Version with bug

10.0.40

### Is this a regression from previous behavior?

No, this is something new

### Last version that worked well

Unknown/Other

### Affected platforms

iOS

### Affected platform versions

IOS 26

### Did you find any workaround?

Nope

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Research direction

Start by finding the iOS tab image-loading completion block where RCTImageLoader assigns each tabBarItem.image. Check how the UITabBar is laid out after the callback, then verify that labels are correctly positioned on the initial render without requiring a tab click.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.