Hi there I'm creating a Xamarin Forms application with Prism and everything is running smoothly bar one small UI issue. The ios version is displaying the following :
The Hamburger menu is not showing and in its place is a piece of text labeled "default".The issue is only occurring in the ios version. I researched the issue and some mentioned that you must wrap it in a navigation page. However on my app startup I wrap the page in a navigation page using the prism navigation service:
protected override void OnInitialized()
{
InitializeComponent();
NavigationService.navigateAsync("WelcomePage/NavPage/TBHomePage");
}
If anyone has experienced this before it would be a create help Thanks for reading :)
iOS doesn't have a hamburger icon in its system icons. You will have to manually add it. Here's a github project where I added a menu icon to a Xamarin.Forms project.
https://github.com/valdetero/SevenDays/blob/master/SevenDays.UI/SevenDays.UI/Views/MenuPage.cs#L17
public class MenuPage : ContentPage
{
public MenuPage()
{
Icon = PlatformImage.Resolver("menu.png");
Title = "menu"; // The Title property must be set.
Then make sure you have the required resolutions (1x, @2x, @3x) in your Resources
folder.
https://github.com/valdetero/SevenDays/tree/master/SevenDays.UI/SevenDays.UI.iOS/Resources
PlatformImage.Resolver
only had formatted the path per platform:
public static string Resolver(string image)
{
return string.Format(Device.OnPlatform("{0}", "{0}", "Assets/{0}"), image);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With