1
votes

I have a Xamarin Forms Shell Application with a hamburger menu. When I open the app I can't see the hamburger menu on my iPhone (but on my Android). When I navigate somewhere and go back the hamburger icon appears as expected. For handling the hamburger menu I rely on the default generated code of the app shell template and just added some further items to the menu.

enter image description here enter image description here

How can I tell shell to show my menu icons always?

Github Link to the project: https://github.com/NPadrutt/MoneyFox.Windows/tree/mobile-redesign

1
What is the version of XF in you project ? It seems an issue on older version . - Lucas Zhang
I'm on version 4.8.0.1269 - NPadrutt
Could you share a sample so that I can test it on my side directly ? - Lucas Zhang
I'm trying to create a sample but so far I can't reproduce it in a new project. In case that is any help, the original project is open source. I put the link in the original post. - NPadrutt
Can you share your navigation code? Plus your shell creation and basic shell structure? - FreakyAli

1 Answers

1
votes

It caused by the Custom Renderer .

in MoneyFox.iOS ->Renderer->CustomContentPageRenderer .

        ToolbarList.Sort((i1, i2) =>
                         {
                             return i1.Priority > i2.Priority
                                    ? -1 : 1;
                         });

        foreach(ToolbarItem itm in ToolbarList)
        {
            if(itm.Priority < 0)
                LeftNavList.Add(itm.ToUIBarButtonItem());
            else
                RightNavList.Add(itm.ToUIBarButtonItem());
        }

        navigationItem.SetLeftBarButtonItems(LeftNavList.ToArray(), false);
        navigationItem.SetRightBarButtonItems(RightNavList.ToArray(), false);

The above code will re-sort the item on NavigationBar . Which will cause the issue . The easiest solution is don't use the renderer . In the case it seems doesn't have any obvious effect .

//[assembly: ExportRenderer(typeof(ContentPage), typeof(CustomContentPageRenderer))]