I need to push viewController
in the new window by code. I am doing below code but its not working.
let win = UIWindow(frame: UIScreen.main.bounds)
let nc = UINavigationController(rootViewController: self)
nc.view.backgroundColor = .clear
win.rootViewController = nc
win.windowLevel = UIWindow.Level.alert + 1
win.makeKeyAndVisible()
Does anyone have idea, how to push a viewController in new window?