Centering Navigation Title#2200
Merged
JaquelineGomez merged 12 commits intomicrosoft:mainfrom Aug 21, 2025
Merged
Conversation
added 12 commits
August 13, 2025 11:44
Contributor
|
just double checking, after initial setup, do we ever do a layout change that would require a call to |
Contributor
|
nit: can we rename pr title |
joannaquu
approved these changes
Aug 21, 2025
Contributor
Author
The navigation title is not being changed meaning the size does not change, so no. Also tested with rotating the device and it still has the title centered correctly. |
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.
Platforms Impacted
Description of changes
In iOS 26, the containingStackView (which manages the title and subtitle) was expanding to fill the entire available space to the right of the back button, causing the text to be centered within this oversized container rather than within the navigation bar itself. This resulted in visually off-center navigation titles. This fix calculates the minimum space required by the containingStackView to properly display all its content, allowing the navigation controller to center the appropriately-sized container within the navigation bar for proper title alignment.
Verification
iPhone 16 Pro with iOS 26 and iOS 18 (no affect on iOS 18)
iPad iOS 16
Visual Verification
Pull request checklist
This PR has considered:
Microsoft Reviewers: Open in CodeFlow