Skip to content

Commit

Permalink
✅[CHORE] #146 - 화면전환 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jumining committed Jan 19, 2023
1 parent e88ae4d commit 83b01ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,14 @@ extension UIViewController {

self.present(alertViewController, animated: true, completion: completion)
}

func changeRootViewController(_ viewControllerToPresent: UIViewController) {
if let window = UIApplication.shared.windows.first {
window.rootViewController = viewControllerToPresent
UIView.transition(with: window, duration: 0.5, options: .transitionCrossDissolve, animations: nil)
} else {
viewControllerToPresent.modalPresentationStyle = .overFullScreen
self.present(viewControllerToPresent, animated: true, completion: nil)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ extension StudioMapViewController {

private func setUpNavigationBar() {
self.navigationController?.navigationBar.isHidden = true
navigationBar.popViewController = { self.navigationController?.popViewController(animated: true) }
navigationBar.popViewController = { self.changeRootViewController(HomeViewController()) }
}

private func setLatLngNotification() {
Expand Down

0 comments on commit 83b01ac

Please sign in to comment.