maui icon indicating copy to clipboard operation
maui copied to clipboard

[iOS] Shell.TitleView doesn't show accurate if not using just a string binding

Open AndreasReitberger opened this issue 3 years ago • 7 comments

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>

image

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.

image

Steps to Reproduce

  1. Create a new MAUI app
  2. Add the snippet above to the MainPage
  3. 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

AndreasReitberger avatar Nov 12 '22 13:11 AndreasReitberger

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.

ghost avatar Nov 14 '22 15:11 ghost

@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!

AndreasReitberger avatar Nov 23 '22 05:11 AndreasReitberger

I got the same problem...

FM1973 avatar Dec 06 '22 16:12 FM1973

I got the same problem.

MaksimAdamenko avatar Dec 06 '22 16:12 MaksimAdamenko

@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.

DDHSchmidt avatar Dec 15 '22 15:12 DDHSchmidt

Happens on IOS 16, 15 and lower is fine.

FM1973 avatar Dec 19 '22 06:12 FM1973

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 });

FM1973 avatar Dec 21 '22 13:12 FM1973

It happens on iOS 15.5 and 16 for me, unless I use the custom handler workaround suggestion above.

harrykontopoulos avatar Jan 02 '23 16:01 harrykontopoulos