Skip to content

Commit

Permalink
Merge pull request #431 from TeamNADA/feature/#424
Browse files Browse the repository at this point in the history
feat: 명함 생성 시 내 명함 탭으로 이동 (#424)
  • Loading branch information
hyun99999 authored Apr 15, 2023
2 parents 0c5ace5 + 78e11b6 commit df3753b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,13 @@ extension CardCreationPreviewViewController {
case .success:
print("cardCreationWithAPI - success")

guard let presentingVC = self.presentingViewController else { return }

NotificationCenter.default.post(name: .creationReloadMainCardSwiper, object: nil)

guard let presentingTabBarVC = self.presentingViewController as? TabBarViewController,
let presentingNavigationVC = presentingTabBarVC.selectedViewController as? UINavigationController else { return }

self.dismiss(animated: true) {
presentingNavigationVC.popToRootViewController(animated: true)
self.activityIndicator.stopAnimating()
self.loadingBgView.removeFromSuperview()

Expand All @@ -247,7 +249,7 @@ extension CardCreationPreviewViewController {
.setHeight(587)
nextVC.modalPresentationStyle = .overFullScreen

presentingVC.present(nextVC, animated: true) {
presentingTabBarVC.present(nextVC, animated: true) {
UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isFirstCard)
}
}
Expand Down

0 comments on commit df3753b

Please sign in to comment.