// 1️⃣ AppDelegate
if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
appDelegate.window?.rootViewController = MyviewController
}
// 2️⃣ SceneDelegate
if let windowScene = UIApplication.shard.connectedScenes.first as UIWindowScene,
let sceneDelegate = windowScene.delegate as? SceneDelegate
{
sceneDelegate.window?.rootViewController = MyViewController
// rootViewController 변경 시 애니메이션 추가
if let window = sceneDelegate.window {
UIView.transition(with: window, duration: 0.25, options: .transitionCrossDissolve, animations: { })
}
}