Skip to content

fix: use the system close button on iOS 26 - #126

Merged
ykisana merged 1 commit into
mainfrom
fix/location-close-button
Nov 18, 2026
Merged

ykisana merged 1 commit into
mainfrom
fix/location-close-button

Conversation

@ykisana

@ykisana ykisana commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #124.

What

  • On iOS 26 and later, the close buttons on the location screens are the system Liquid Glass close button (an X on glass), like the rest of iOS:
    • the Location Key check inside the key sheet (Noah's screenshot);
    • the saved-key card on the location map, as a glass circle X since it's not in a toolbar.
  • Settings' text "Close" button becomes the same X on iOS 26 and later.
  • The Location Key check no longer forces a solid navigation bar on iOS 26, so the system's glass shows through.
  • iOS 17 and 18 look the same as before.

Why

Apple's Toolbars guidelines:

  • Use the standard Close button. "Prefer the standard symbols… don't use a text label that says Back or Close", and implement it consistently across the app.
  • Reduce custom toolbar backgrounds. They "might overlay or interfere with background effects that the system provides".

The old X was an xmark.circle.fill image inside a toolbar button. On iOS 26 the toolbar already wraps every button in glass, so it showed as a gray filled circle inside a glass circle.

How

  • CloseButton uses Button(role: .close, action:) on iOS 26 and later.
    • In a toolbar: that draws the system X with no custom label. It sits in .topBarTrailing, because .confirmationAction would turn it into a blue, prominent confirm button.
    • Outside a toolbar: the role alone falls back to a text "Close", so the .inline variant puts an xmark in Apple's .glass button style with a circle shape.
    • Before iOS 26: each spot keeps exactly its previous xmark.circle.fill.
  • Settings picks its toolbar item by OS version: the glass X on iOS 26 and later, the previous text "Close" before.
  • LocationUnlockView drops .toolbarBackground(.visible, for: .navigationBar) on iOS 26 and later.

Tests

The Location Key check showed a gray xmark.circle.fill image inside the
toolbar's own glass button, and forced a solid navigation bar. On iOS
26 and later, close buttons now use the system Liquid Glass close
button: Button(role: .close) in the Location Key check and Settings
toolbars, and a glass circle X on the saved-key card. The Location Key
check also stops forcing a bar background. iOS 17 and 18 look the same
as before.

Closes #124.
@ykisana
ykisana merged commit 5945091 into main Nov 18, 2026
1 check passed
@ykisana
ykisana deleted the fix/location-close-button branch November 18, 2026 18:23
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.

X on Location Popup does not follow liquid glass design

1 participant