maui
maui copied to clipboard
[iOS] Shell.TitleView doesn't show accurate if not using just a string binding
Description
When setting the Shell.TitleView in XAML, the content isn't shown up accurate on iOS 16.1.
<Shell.TitleView>
<Grid
ColumnDefinitions="*,Auto"
BackgroundColor="Red"
>
<Label
Text="Headline"
/>
<Button
Grid.Column="1"
Text="Button"
/>
</Grid>
</Shell.TitleView>

The Label isn't shown at all, the Button is only displayed half and setting a BackgroundColor has no effect (just for seeing the bounds of the Grid.
I just updated my repro for another issue with this issue.
Android works fine with the same project.

Steps to Reproduce
- Create a new MAUI app
- Add the snippet above to the
MainPage - Run it on iOS
Link to public reproduction project repository
https://github.com/AndreasReitberger/ReproScrollingIssueModal
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16.1
Did you find any workaround?
No response
Relevant log output
No response
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
@jsuarezruiz Is there any workaround for that? This also is keeping me from the app release. Or at least an ETA when this will be addressed? Thank you!
I got the same problem...
I got the same problem.
@jsuarezruiz Is there any workaround for that? This also is keeping me from the app release. Or at least an ETA when this will be addressed? Thank you!
You could try
<Grid Margin="{OnPlatform Default='0', iOS='0,0,0,-50'}>
That should fix the offset of the TitleView.
Downside is: You can't limit this to iOS 16 only. If your user has iOS 15, this will probably look screwed.
Happens on IOS 16, 15 and lower is fine.
Hey there. The following workaround works form me: https://github.com/xamarin/Xamarin.Forms/issues/15512 In mauiprogram I then configure the handler like this:
.ConfigureMauiHandlers((handlers) => { #if IOS16_0_OR_GREATER handlers.AddHandler(typeof(Shell), typeof(CustomShellRenderer)); #endif });
It happens on iOS 15.5 and 16 for me, unless I use the custom handler workaround suggestion above.