How to Add a Floating Action Button to Bottom Navigation Bar in IOS (Xamarin)?

629 Views Asked by At

How to add a floating action button to bottom navigation bar in IOS (Xamarin)?

Example of screen layout

enter image description here

In order to add navigation bar, using freshmvvm provided function "FreshTabbedNavigationContainer".

However, I have no idea where should I add a floating action button on top of bottom navigation bar with the following code. Please feel free to comment.

using FreshMvvm;
.....
public App()
        {
            InitializeComponent();

            //MainPage = new MainPage();

            if (Device.RuntimePlatform == Device.iOS)
            {
                var tabs = new FreshTabbedNavigationContainer("MyTabs");

                tabs.AddTab<MainPageModel>("Home", "");
                tabs.AddTab<MainPageModel>("Saved", "");
                tabs.AddTab<MainPageModel>("Zoom", "");
                tabs.AddTab<MainPageModel>("Notifications", "");
                tabs.AddTab<MainPageModel>("Profile", "");

                // Set the selected tab to the middle one.
                tabs.SwitchSelectedRootPageModel<MainPageModel>();

                MainPage = tabs;
            }
         
        }

BasePage (Customized base class of contentPage)

public class BasePage : ContentPage
    {
        public BasePage()
        {
            NavigationPage.SetHasNavigationBar(this, false);
        }
    }
0

There are 0 best solutions below