我有3個viewController,名爲firstController,secondController和thirdController。 我的邏輯是firstController.presentViewController(secondController),然後secondController.presentViewController(thirdController),並通過UIApplication.shareApplication()的設置RootViewController的。keywindow!.rootViewController = firstController ...iOS更改rootViewController
但是當我設置firstController爲當第三控制器使用thirdController.modalTransitionStyle = UIModalTransitionStyle.CrossDissolve將第二控制器的viewController呈現給第三控制器時,第一控制器將在動畫期間顯示。
我可以不使用rootViewController嗎?
感謝您的評論,但secondController和thirdController都有一個按鈕來解除他們自己。 – away