ios - Is it possible to segue between root view controllers while keeping a modal on top of them? -
i'd reload view controller segueing (from itself) keep modal view on of during whole process. possible swift?
here's code i'm using segue between vcs. it's working fine.
enum appscreens: string { case startup = "startupviewcontroller" case welcome = "welcomescreen" case profile = "profilescreen" case game = "gamescreen" } static func pagesegue(_ currentscreen: appscreens) { let controllerid = currentscreen.rawvalue let newvc: uiviewcontroller = uistoryboard(name: "main", bundle: nil).instantiateviewcontroller(withidentifier: controllerid) uiviewcontroller let appdelegate = uiapplication.shared.delegate as! appdelegate appdelegate.window?.rootviewcontroller = newvc }
Comments
Post a Comment