Fix light border around iOS 26 modal corners - #4499
Open
regnerus wants to merge 2 commits into
Open
Conversation
On iOS 26, UIKit applies software bottom corner clipping to native modals that are already aligned with the physical display corners. The antialiased edge is composited against the opaque system sheet background, producing a light seam around dark modal content. Preserve UIKit's top corner radii, but remove the redundant bottom radii for full-width, bottom-aligned iPhone modals. Other modal geometries retain their original corner configuration.
UIKit's modal backing view can keep a light system background when the presented screen uses a dark background. This remains visible along the antialiased top corners, even after removing the redundant bottom radii. For full-width, bottom-aligned iPhone modals on iOS 26, match the backing view to the presented content. Other modal layouts keep UIKit's original appearance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Description
While testing a dark modal on an iPhone running iOS 26 or newer, I noticed a thin light line following the rounded bottom corners. The line remains visible after the presentation animation has finished.
The bottom line is caused by redundant software clipping where the modal already follows the physical display corners. A top line can also appear because UIKit's native backing view can retain the system background color, which contrasts with the modal content along the antialiased edge.
Changing the React Native view background,
contentStyle, and navigation theme did not help. The line comes from UIKit's modal container instead.On iOS 26, UIKit gives large modals an opaque system background. It also rounds the bottom of the modal in software, even when the modal already reaches the bottom and sides of the physical display. The antialiased edge of that second rounding exposes a small amount of the light system background.
This change detects that specific layout, matches the native backing view to the modal content, and removes only the redundant bottom corner radii. The native top corners are kept as they are. Smaller or differently positioned modals continue to use UIKit's original corner configuration.
The behavior is limited to iPhones running iOS 26 or newer.
Apple has confirmed that large sheets becoming opaque is intentional on iOS 26:
https://developer.apple.com/forums/thread/795880
Possibly related to #3559, although that issue describes a temporary shimmer during
formSheetanimations. This issue is a permanent line on a stationarymodal.Before & after - visual documentation
Before
After
Test plan
Checklist