Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class FinishJourneyView: BaseView {
private let thirdTextLabel = UILabel()
private let characterLottie = LottieAnimationView(name: "bori_cake")

let startButton = ByeBooButton(titleText: "새로운 이별 극복 여정 시작하기", type: .enabled)
let startButton = ByeBooButton(titleText: "새로운 여정 시작하기", type: .enabled)
let lookBackButton = ByeBooButton(titleText: "완료한 여정 다시보기", type: .sub)
let backHomeLabel = UILabel()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// QuestEmptyView.swift
// ByeBoo-iOS
//
// Created by 최주리 on 5/5/26.
//

import UIKit

final class QuestEmptyView: BaseView {

private let stackView = UIStackView()
private let imageView = UIImageView()
private let textLabel = UILabel()
let button = ByeBooButton(titleText: "보리 만나러 가기", type: .enabled)

override func setStyle() {
stackView.do {
$0.axis = .vertical
$0.spacing = 20
$0.alignment = .center
}

imageView.do {
$0.image = .talk
}

textLabel.do {
$0.text = "하츠핑님, 수고하셨어요.\n보리가 하고 싶은 말이 있다고 해요!"
$0.applyByeBooFont(style: .sub3M18, color: .grayscale50)
$0.numberOfLines = 2
$0.textAlignment = .center
}
}

override func setUI() {
addSubview(stackView)
stackView.addArrangedSubviews(imageView, textLabel, button)
}

override func setLayout() {
stackView.snp.makeConstraints {
$0.centerX.equalToSuperview()
$0.top.equalToSuperview().inset(176.adjustedH)
}

button.snp.makeConstraints {
$0.width.equalToSuperview()
}
}
}

extension QuestEmptyView {
func configure(name: String) {
textLabel.text = "\(name)님, 수고하셨어요.\n보리가 하고 싶은 말이 있다고 해요!"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ final class QuestCheckViewController: BaseViewController {
private static let lastStep = 5

private let questsCheckView = ViewAllQuestBaseView(headerView: QuestCheckHeaderView())
private let finishEmptyView = QuestEmptyView()
private let viewModel: ProgressingQuestsViewModel
var coordinator: QuestCheckCoordinating?
private var cancellable = Set<AnyCancellable>()
Expand Down Expand Up @@ -78,6 +79,10 @@ final class QuestCheckViewController: BaseViewController {
$0.backgroundColor = .grayscale900
}
}

override func setAddTarget() {
finishEmptyView.button.addTarget(self, action: #selector(goBoriButtonDidTap), for: .touchUpInside)
}
}

extension QuestCheckViewController: ToastPresentable, ToastErrorHandler {
Expand All @@ -104,8 +109,9 @@ extension QuestCheckViewController: ToastPresentable, ToastErrorHandler {
self?.updateQuestMainUI(name: name, journey: journey, quests: quests)
case (.success(_), .success(_), .failure(_)):
self?.coordinator?.moveQuestStart()
case (.success(_), .failure(.notFound), .failure(_)):
self?.coordinator?.moveFinishQuest()
case let (.success(name), .failure(.notFound), .failure(_)):
self?.finishEmptyView.configure(name: name)
self?.view = self?.finishEmptyView
case (_, .failure(let error), _), (_, _, .failure(let error)):
self?.handleError(error)
default:
Expand Down Expand Up @@ -208,6 +214,13 @@ extension QuestCheckViewController {
}
}

extension QuestCheckViewController {
@objc
private func goBoriButtonDidTap() {
coordinator?.moveFinishQuest()
}
}

extension QuestCheckViewController: UICollectionViewDelegate {

func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "image 1452.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading