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 @@ -8,8 +8,8 @@
// 온보딩 시에 퀘스트 방식 선택

enum SelectQuestType: CaseIterable {
case reunion
case recording
case reunion
}

extension SelectQuestType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ final class ByeBooButton: UIButton {
}

func updateTitle(_ title: String) {
self.setTitle(titleText, for: .normal)
self.setTitle(title, for: .normal)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,21 @@ struct ByeBooNavigationBar {
target: topViewController,
action: action
)
navigationItem.leftBarButtonItem = backButtonItem
navigationItem.leftBarButtonItems = [makeSpacer(), backButtonItem]

case .backAndMenu:
let backButtonItem = makeBarButtonItem(
image: .left.withTintColor(.white),
target: topViewController,
action: action
)
navigationItem.leftBarButtonItem = backButtonItem
navigationItem.leftBarButtonItems = [makeSpacer(), backButtonItem]
makeTopRightButtonItem(
image: .menu,
target: topViewController,
navigationItem: navigationItem,
action: secondAction
action: secondAction,
padding: 0
)

case .title(let string, _):
Expand Down Expand Up @@ -171,20 +172,21 @@ struct ByeBooNavigationBar {
target: topViewController,
action: action
)
navigationItem.leftBarButtonItem = backButtonItem
navigationItem.leftBarButtonItems = [makeSpacer(), backButtonItem]

case .editAndClose:
let editButtonItem = makeBarButtonItem(
image: .edit,
target: topViewController,
action: secondAction
)
navigationItem.leftBarButtonItem = editButtonItem
navigationItem.leftBarButtonItems = [makeSpacer(), editButtonItem]
makeTopRightButtonItem(
image: .xicon,
target: topViewController,
navigationItem: navigationItem,
action: action
action: action,
padding: 8.adjustedH
)
case .confirmAndBack:
let backButtonItem = makeBarButtonItem(
Expand All @@ -197,8 +199,8 @@ struct ByeBooNavigationBar {
target: topViewController,
action: secondAction
)
navigationItem.leftBarButtonItem = backButtonItem
navigationItem.rightBarButtonItem = confirmButtonItem
navigationItem.leftBarButtonItems = [makeSpacer(), backButtonItem]
navigationItem.rightBarButtonItems = [makeSpacer(padding: 16), confirmButtonItem]
case .none:
let emptyItem = makeBarButtonItem(
image: UIImage(),
Expand Down Expand Up @@ -255,9 +257,22 @@ struct ByeBooNavigationBar {
image: UIImage,
target: BaseViewController,
navigationItem: UINavigationItem,
action: Selector?
action: Selector?,
padding: CGFloat = 16.adjustedW
) {
let closeButtonItem = makeBarButtonItem(image: image, target: target, action: action)
navigationItem.rightBarButtonItem = closeButtonItem
let spacer = makeSpacer(padding: padding)
navigationItem.rightBarButtonItems = [spacer, closeButtonItem]
}

private static func makeSpacer(padding: CGFloat = 2.adjustedW) -> UIBarButtonItem {
let spacer = UIBarButtonItem(
barButtonSystemItem: .fixedSpace,
target: nil,
action: nil
)
spacer.width = padding

return spacer
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ final class OneLineTextBoxView: BaseView {
private let tagTitle: String?
private let tagType: ByeBooFilledTagType?
private let isHighlighted: Bool
private let titleColor: UIColor?

init(
title: String,
tagTitle: String? = nil,
tagType: ByeBooFilledTagType? = nil,
isHighlighted: Bool = false
isHighlighted: Bool = false,
titleColor: UIColor? = nil
) {
self.title = title
self.tagTitle = tagTitle
self.tagType = tagType
self.isHighlighted = isHighlighted
self.titleColor = titleColor

if let tagType,
let tagTitle {
Expand All @@ -50,9 +53,10 @@ final class OneLineTextBoxView: BaseView {
layer.borderColor = UIColor(.primary300).cgColor
}

let finalColor = titleColor ?? (isHighlighted ? .grayscale50 : .grayscale300)
titleLabel.applyByeBooFont(
style: .body3R16,
color: isHighlighted ? .grayscale50 : .grayscale300,
color: finalColor,
numberOfLines: 1
)
titleLabel.isUserInteractionEnabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extension DateFormatter {

private static let displayDate: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy.MM.dd."
formatter.dateFormat = "yyyy. MM. dd."
return formatter
}()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ extension InformationBaseView {
self.informationView = informationView
self.progressBarType = progressBarType
self.progressView = ProgressBarView(type: self.progressBarType)
self.nextButton.updateTitle(progressBarType.buttonName)

self.setUI()
self.setStyle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ import Then

enum ProgressBarType: Int {
case first, second

var buttonName: String {
switch self {
case .first:
"다음으로"
case .second:
"완료하기"
}
}
}

final class ProgressBarView: BaseView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import Then
final class QuestCardsView: BaseView {

private(set) var questCards = [
QuestCardView(
title: "재회 준비",
subTitle: "X와의 재회를 위해\n나를 먼저 돌아보고\n상대를 이해해요",
image: .reunion
),
QuestCardView(
title: "이별 극복",
subTitle: "질문과 미션을 통해\n나만의 삶을\n회복해 나가요",
image: .overcomingBreakup
),
QuestCardView(
title: "재회 준비",
subTitle: "X와의 재회를 위해\n나를 먼저 돌아보고\n상대를 이해해요",
image: .reunion
)
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ extension InformationViewController {
@objc
private func nextButtonDidTap() {
switch informationBaseView.informationView {
case is InputNicknameView: saveNickname()
case is SelectQuestView: saveQuest()
case is InputNicknameView:
saveNickname()
case is SelectQuestView:
saveQuest()
default: break
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class MyPageView: BaseView {

private(set) var scrollView = UIScrollView()
private let contentView = UIView()
private(set) var nameView = OneLineTextBoxView(title: "")
private(set) var nameView = OneLineTextBoxView(title: "", titleColor: .grayscale100)
private(set) var moveButton = UIButton()
private let divider1 = SectionDividerView()
private(set) var myRecordView = MyRecordView()
Expand Down Expand Up @@ -66,7 +66,7 @@ final class MyPageView: BaseView {
$0.horizontalEdges.equalToSuperview().inset(24.adjustedW)
}
myRecordView.snp.makeConstraints {
$0.top.equalTo(divider1.snp.bottom).offset(8.adjustedH)
$0.top.equalTo(divider1.snp.bottom)
$0.horizontalEdges.equalToSuperview()
}
worldView.snp.makeConstraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class QuestHeaderBaseView: BaseView {
backgroundColor = .grayscale900

titleLabel.applyByeBooFont (
style: .head1M24,
style: .head2M22,
color: .grayscale50,
textAlignment: .left,
numberOfLines: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class CommonQuestHeaderView: BaseView {

override func setLayout() {
titleLabel.snp.makeConstraints {
$0.top.equalToSuperview().inset(16.adjustedH)
$0.top.equalToSuperview()
$0.horizontalEdges.equalToSuperview().inset(24.adjustedW)
}
subtitleLabel.snp.makeConstraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ final class CommonQuestMyAnswersView: BaseView {
)
answersTableView.do {
$0.backgroundColor = .grayscale900
$0.separatorStyle = .none
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ final class CommonQuestView: BaseView {
)
$0.tableHeaderView = headerView
$0.sectionHeaderTopPadding = 0
$0.separatorStyle = .none
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ final class DateNavigator: UITableViewHeaderFooterView {
dateLabel.applyByeBooFont(
style: .body2M16,
text: dateFormatter.string(from: currentDate),
color: .grayscale50
color: .grayscale50,
textAlignment: .center
)
nextButton.do {
$0.setImage(.nextOff, for: .normal)
Expand Down Expand Up @@ -92,6 +93,7 @@ final class DateNavigator: UITableViewHeaderFooterView {
$0.centerY.equalToSuperview()
}
dateLabel.snp.makeConstraints {
$0.width.equalTo(58.adjustedW)
$0.centerY.equalToSuperview()
}
nextButton.snp.makeConstraints {
Expand Down
Loading