-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Shell/NavigationPage TitleView #20959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Shell/NavigationPage TitleView #20959
Conversation
|
Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Oh my, never knew I'd see a fix from the issue I suffered from 4 years ago in X.F. days! Are there any plans to add it to .net 8 SR 4? (hopefully) |
src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs
Show resolved
Hide resolved
| else if (screenWidth >= 414) | ||
| { | ||
| // 5.5 inch | ||
| spacer.Width -= 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you done tests with 6.1" and 6.7" simulators or devices?
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you retarget this for net9?
Yep, I think it is a good idea |
Is there no chance we can get this fix in a patch release for .NET 8? Preferably sooner than later? I'm wrestling with this issue at the moment and would really appreciate a fix but we only use LTS versions for production apps. |
|
I also can't use this code directly in our app because too many pieces are internal for me to drop this in as a replacement renderer. |
|
Will this be fixed sometime soon? We can't change the color of our navigation bar to anything but white without having unsightly gaps on either end. |
|
@kubaflo Any update on this PR? What is blocking progress here? |
|
Hi, @Felix-Dev it is not up to me what will happen with this pr |
|
/rebase |
|
This is also affecting us, an app with millions of users being forced to migrate to MAUI. Huge gaps on either end of the nav bar if we try to do any other color. Any update? Any workaround? @PureWeen |
|
@kubaflo It looks like 2 failing checks. Anything you're familiar with so this can get merged? |
|
@jbeacham Hi!, It's not up to me when and if PRs get merged, but I will rebase this one and solve conflicts :) |
db33912 to
d1fcccc
Compare
|
I seem to have a similar issue on android too |
|
@kubaflo thanks for PR, have you noticed similar PR for Android, or maybe some workaround? |
|
@dainius-r @amirvenus regarding the left margin: #20967
|
d1fcccc to
8199017
Compare
|
Any update on this PR? What is blocking progress here? |
|
/rebase |
8199017 to
0724de7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
0724de7 to
123e896
Compare
Added a comment with a link to Apple docs Refactor

Fixes #9333
Fixes #19231
Fixes #5063
Current behavior
Layout options have no effect on the title view. The content inside the
titleViewbehaves as it has bothHorizontalOptionsandVerticalOptionsset toFill. Also, notice that there's a horizontal margin that cannot be removed even with setting the negative values to margin eg.Margin="-20,0"(#19231)Currently
Proposed behavior #5063
Utilizes our current LayoutOptions to indicate how you want a TitleView to layout on the screen and removes the default horizontal margin so that we can customize it.
Default- (horizontal and vertical options set to fill implicitly)HorizontalOptions="Start"HorizontalOptions="Center"HorizontalOptions="End"VerticalOptions="Start"VerticalOptions="Center"VerticalOptions="End"VerticalOptions="Start"HorizontalOptions="Start"VerticalOptions="Center"HorizontalOptions="Center"VerticalOptions="End"HorizontalOptions="End"Remarks
I didn't implement anything that changes the behavior when additional toolbar items are added. For example, if there's a back button the title view places itself to the right of this button. It is because I'm not sure what is the desired behavior. On one hand, it looks weird that when we want to center the title it is moved to the right, but on the other, it is the default iOS's behavior and I believe a future discussion should be made xamarin/Xamarin.Forms#4848
