0
在我的節目,一些viewControllers之間的轉換都通過下面的代碼編程方式管理:斯威夫特:安全有關presentScene()的做法
let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let newViewController = storyBoard.instantiateViewController(withIdentifier: "NewViewController") as! NewViewController
self.present(newViewController, animated: true, completion: nil)
我一直在想,如何安全的做法,這是的。當currentScene被調用時,它是否會做任何事情來「擦除」它下面的屏幕,還是隻是在現有的頂部堆疊更多的視圖?如果不是,它是如何工作的?這也是管理這種程序轉換的最佳方式(就性能而言)?