diff --git a/Presentation/Sources/Component/Common/DownloadModelCard.swift b/Presentation/Sources/Component/Common/DownloadModelCard.swift index 019212ce..4cfcf48f 100644 --- a/Presentation/Sources/Component/Common/DownloadModelCard.swift +++ b/Presentation/Sources/Component/Common/DownloadModelCard.swift @@ -144,9 +144,7 @@ extension DownloadModelCard { case .immutable: immutableProgressView.isHidden = false } - downloadMessageLabel.isHidden = false - downloadMessageLabel.setTypography(text: "다운로드 중...", style: .body2) - downloadMessageLabel.textColor = .gray950 + downloadMessageLabel.isHidden = true case .downloaded: switch style { case .default: diff --git a/Presentation/Sources/DesignSystem/UINavigationController+Extensions.swift b/Presentation/Sources/DesignSystem/UINavigationController+Extensions.swift new file mode 100644 index 00000000..1cc677c4 --- /dev/null +++ b/Presentation/Sources/DesignSystem/UINavigationController+Extensions.swift @@ -0,0 +1,12 @@ +import UIKit + +extension UINavigationController: @retroactive UIGestureRecognizerDelegate { + override open func viewDidLoad() { + super.viewDidLoad() + interactivePopGestureRecognizer?.delegate = self + } + + public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { + return viewControllers.count > 1 + } +} diff --git a/Presentation/Sources/ViewModel/OnBoarding/OnBoardingViewModel.swift b/Presentation/Sources/ViewModel/OnBoarding/OnBoardingViewModel.swift index 0a2f6775..1cf84d42 100644 --- a/Presentation/Sources/ViewModel/OnBoarding/OnBoardingViewModel.swift +++ b/Presentation/Sources/ViewModel/OnBoarding/OnBoardingViewModel.swift @@ -90,7 +90,8 @@ public final class OnBoardingViewModel { case .download: switch status.storage { case .downloading: return "취소" - default: return "이전" + case .downloaded: return "이전" + default: return "나중에" } default: return "이전" @@ -174,11 +175,15 @@ extension OnBoardingViewModel { // 다운로드 중일 때는 다운로드 취소 downloadTask?.cancel() downloadTask = nil - default: + case .downloaded: + // 이미 다운로드 완료했을 때는 이전 단계로 let nextIndex = currentStepIndex - 1 guard nextIndex >= 0 else { return } isPaging = true scrollAction(nextIndex) + default: + // 다운로드 안 했거나 실패했을 때는 '나중에' (다음 단계로 이동) + nextPage(scrollAction: scrollAction) } default: // 뒤로가기 let nextIndex = currentStepIndex - 1