Skip to content

Move UINavigationItem extensions to new FluentNavigationItemConfiguration#2179

Merged
mischreiber merged 3 commits intomicrosoft:mainfrom
mischreiber:UINavigationItem_26
Jun 13, 2025
Merged

Move UINavigationItem extensions to new FluentNavigationItemConfiguration#2179
mischreiber merged 3 commits intomicrosoft:mainfrom
mischreiber:UINavigationItem_26

Conversation

@mischreiber
Copy link
Copy Markdown
Collaborator

@mischreiber mischreiber commented Jun 13, 2025

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

Second pass at addressing #2177. In order to avoid potential conflicts and confusion, this breaking change removes all extended UINavigationItem properties and places them onto a single configuration object, the FluentNavigationItemConfiguration class. This removes the conflict with subtitle.

However, now that we know this new property is coming, this change also builds fallbacks to handle the existence of UINavigationItem.subtitle, and to prefer it to the existing Fluent value. This is done with a few changes:

  • Marking subtitle deprecated on iOS/visionOS/macCatalyst 26+
  • Adding observers for the new property when using a compiler version >=6.2 (which ships with the new iOS SDK)
  • Configuring the navigation item using the appropriate property based on compiler version, preferring the system API over our own if possible.

Verification

Confirmed expected behavior across iOS 18 and 26, using both Xcode 16.4 and 26.0b1.

Visual Verification
iOS 17 iOS 18 iOS 26 iOS 18 with iOS 26 SDK
iOS17 iOS18 iOS26 iOS18with26SDK

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@mischreiber mischreiber requested a review from laminesm June 13, 2025 05:25
@mischreiber mischreiber requested a review from a team as a code owner June 13, 2025 05:25
@mischreiber mischreiber added the API break This PR introduces a breaking API change label Jun 13, 2025
@mischreiber mischreiber merged commit 694f394 into microsoft:main Jun 13, 2025
7 checks passed
@mischreiber mischreiber mentioned this pull request Jun 13, 2025
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API break This PR introduces a breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants