我是 swift 新手。我想将一个屏幕移动到另一个屏幕,但问题是当我转到另一个屏幕时,旧屏幕会在新屏幕中覆盖。
这是我的代码
dispatch_async(dispatch_get_main_queue()) {
let appsDelegate = UIApplication.sharedApplication().delegate
appsDelegate?.window!!.rootViewController = nil
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let nextViewController = storyBoard.instantiateViewControllerWithIdentifier("launcherEntry") as! UINavigationController
appsDelegate?.window!!.rootViewController = nextViewController
}
最佳答案
如果您使用UINavigationController
,您应该将第二个 View (屏幕)推到第一个 View (屏幕)上。查看offical guide .
关于ios - 快速移动另一个屏幕时覆盖屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38390150/