After following a tutorial for making a side menu programmatically without pods I have come upon an issue regarding my navigation. I have my login view set as the root view controller, in which after logging in I will be presented with the home view. When this transition happnes the navigation bar that should be appearing for the side menu is does not appear and thus I can't access my side menu. I know my side menu works because when I set the home view as the root controlle rthe bar shows up allowing me to click the side menu.
Scene delegate:
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(frame: windowScene.coordinateSpace.bounds)
window?.windowScene = windowScene
let nav = UINavigationController()
let mainView = LogInController()
nav.viewControllers = [mainView]
window?.rootViewController = nav
window?.makeKeyAndVisible()
The transitions I use in the log in controller:
let homeView = HomeMenu()
homeView.modalTransitionStyle = .flipHorizontal
homeView.modalPresentationStyle = .overCurrentContext
present(homeView, animated: true, completion: nil)
Nevermind I instead just added a navigation bar programmatically and from there added accessed my side menu.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.