Skip to content

After upgrading the ios sdk to 18 now unable to use the SideMenu #706

@AzzimFarid69

Description

@AzzimFarid69

Eventhough i have already setup the side menu it says that it could not instantiate LeftMenuNavigationController from storyboard

fileprivate func setupSideMenu() {
// Try to instantiate the SideMenu controller safely
guard let menu = storyboard!.instantiateViewController(withIdentifier: "LeftMenuNavigationController") as? SideMenuNavigationController else {
print("❌ Could not instantiate LeftMenuNavigationController from storyboard")
return
}

    // Configure presentation
    menu.presentationStyle = .viewSlideOutMenuIn // replaces .menuPresentMode
    menu.statusBarEndAlpha = 1                   // replaces .menuFadeStatusBar
    menu.leftSide = true

    // Assign to SideMenuManager
    SideMenuManager.default.leftMenuNavigationController = menu

    // Add gestures using new API
    if let navigationBar = self.navigationController?.navigationBar {
        SideMenuManager.default.addPanGestureToPresent(toView: navigationBar)
    }
    SideMenuManager.default.addScreenEdgePanGesturesToPresent(toView: self.view)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions