You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call stack for the first time presentation of the root controller with sidebar presentation attribute(MvxSidebarPresentation(MvxPanelEnum.Center, MvxPanelHintType.ResetRoot...)):
MvxSidebarPresenter.ShowSidebarViewController
MvxSidebarViewController.ctor
ShowMenuButton extension from MvxSidebarPresenter.ShowPanelAndResetToRoot // left and right panels are nulls here, as result there is no information about icons yet
MvxSidebarViewController.ViewDidLoad
MvxSidebarViewController.SetupSideMenu // left and right panels are being initialised here
Workaround: call ShowMenuButton from ViewDidLoad of the first root view. For this we have to have access to SideBarViewController. It is accessible for derived ViewPresenters only.
// declare custom presenter
public class MyPresenter : MvxSidebarPresenter
{
public MvxSidebarViewController SideBar => SideBarViewController as MvxSidebarViewController;
public MyPresenter(IUIApplicationDelegate appDelegate, UIWindow window) : base(appDelegate, window)
{
}
}
// replace presenter in Setup.cs
protected override IMvxIosViewPresenter CreatePresenter()
{
return new MyPresenter((MvxApplicationDelegate)ApplicationDelegate, Window);
}
// initialize menu from initial root view controller
public override void ViewDidLoad()
{
// ...
this.ShowMenuButton(((MyPresenter)Mvx.Resolve<IMvxIosViewPresenter>()).SideBar);
}
Steps to reproduce
Expected behavior
Menu icon should be visible.
Left menu should appear if swiping from left side.
Actual behavior
There is no menu icon in the top left corner.
Menu is appearing if swiping from right side.
Configuration
Version: 5.2.0
Platform:
The text was updated successfully, but these errors were encountered: