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
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "rounded_max_rectangle.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "rounded_max_rectangle@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "rounded_max_rectangle@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum BitnagilGraphic {
static let loginGraphic = UIImage(named: "login_graphic", in: bundle, with: nil)
static let onboardingRectangle = UIImage(named: "rounded_rectangle", in: bundle, with: nil)
static let onboardingBigRectangle = UIImage(named: "rounded_big_rectangle", in: bundle, with: nil)
static let onboardingMaxRectangle = UIImage(named: "rounded_max_rectangle", in: bundle, with: nil)
static let onboardingFomoGraphic = UIImage(named: "onboarding_fomo_graphic", in: bundle, with: nil)
static let onboardingGrayLine = UIImage(named: "gray_line", in: bundle, with: nil)
static let progressStep1 = UIImage(named: "progress_step1", in: bundle, with: nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,18 @@ final class OnboardingResultSummaryView: UIView {
}

case .outdoor:
return "\(highlightText)을 목표로 해볼게요!"
if highlightText.contains("4") {
return "\(highlightText)을 목표로"
} else {
return "\(highlightText)을 목표로 해볼게요!"
}

default:
return "원하는 중이에요"
if highlightText == "" {
return "원하는 중이에요"
} else {
return "해볼게요!"
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ final class OnboardingResultViewController: BaseViewController<OnboardingViewMod
static let rectangleImageViewTopSpacing: CGFloat = 1.5
static let rectangleImageViewWidth: CGFloat = 310
static let rectangleImageViewHeight: CGFloat = 220
static let rectangleImageViewMaxHeight: CGFloat = 260
static let rectangleImageViewMidHeight: CGFloat = 260
static let rectangleImageViewMaxHeight: CGFloat = 290
static let nameLabelTopSpacing: CGFloat = 30
static let nameLabelLeadingSpacing: CGFloat = 30
static let nameLabelHeight: CGFloat = 25.76
Expand Down Expand Up @@ -96,8 +97,8 @@ final class OnboardingResultViewController: BaseViewController<OnboardingViewMod
private func updateMainLabelTopSpacing() {
let height = view.bounds.height
let spacing: CGFloat = height <= 667 ? Layout.mainLabelMinTopSpacing : Layout.mainLabelMaxTopSpacing

mainLabelTopConstraint?.update(offset: spacing)
resultGraphicViewTopConstraint?.update(offset: Layout.resultGraphicViewTopMinSpacing)
}

override func configureAttribute() {
Expand Down Expand Up @@ -238,38 +239,67 @@ final class OnboardingResultViewController: BaseViewController<OnboardingViewMod
}

let timeResultView = OnboardingResultSummaryView(onboardingType: .time, highlightText: timeResult)
let feelingResultView = OnboardingResultSummaryView(onboardingType: .feeling, highlightText: feelingResult)
let outdoorResultView = OnboardingResultSummaryView(onboardingType: .outdoor, highlightText: outdoorResult)
[timeResultView, feelingResultView, outdoorResultView].forEach {
$0.snp.makeConstraints { make in
make.height.equalTo(Layout.resultLabelHeight)
}
}

let feelingResultStackView = UIStackView()
feelingResultStackView.axis = .vertical
feelingResultStackView.spacing = 6

let feelingResultView = OnboardingResultSummaryView(onboardingType: .feeling, highlightText: feelingResult)
// expand feeling result view
feelingResultStackView.addArrangedSubview(feelingResultView)

let ifNeedExpandFeelingResult = feelingResult.filter({ $0 == "," }).count >= 2
if ifNeedExpandFeelingResult {
let extendtedFeelingResultView = OnboardingResultSummaryView(onboardingType: nil, highlightText: "")
feelingResultStackView.addArrangedSubview(extendtedFeelingResultView)
extendtedFeelingResultView.snp.makeConstraints { make in
let expandedFeelingResultView = OnboardingResultSummaryView(onboardingType: nil, highlightText: "")
feelingResultStackView.addArrangedSubview(expandedFeelingResultView)
expandedFeelingResultView.snp.makeConstraints { make in
make.height.equalTo(Layout.resultLabelHeight)
}
rectangleImageView.image = BitnagilGraphic.onboardingBigRectangle
rectangleHeightConstraint?.update(offset: Layout.rectangleImageViewMaxHeight)
resultGraphicViewTopConstraint?.update(offset: Layout.resultGraphicViewTopMinSpacing)
}

feelingResultStackView.snp.makeConstraints { make in
make.height.equalTo(ifNeedExpandFeelingResult ? Layout.resultLabelMaxHeight : Layout.resultLabelHeight)
}

[timeResultView, feelingResultView, outdoorResultView].forEach {
$0.snp.makeConstraints { make in
// expand outdoor result view
let outdoorResultStackView = UIStackView()
outdoorResultStackView.axis = .vertical
outdoorResultStackView.spacing = 6

outdoorResultStackView.addArrangedSubview(outdoorResultView)
let ifNeedExpandOutdoorResult = outdoorResult.contains("4")
if ifNeedExpandOutdoorResult {
let expandedOutdoorResultView = OnboardingResultSummaryView(onboardingType: nil, highlightText: " ")
outdoorResultStackView.addArrangedSubview(expandedOutdoorResultView)
expandedOutdoorResultView.snp.makeConstraints { make in
make.height.equalTo(Layout.resultLabelHeight)
}
}

[timeResultView, feelingResultStackView, outdoorResultView].forEach {
outdoorResultStackView.snp.makeConstraints { make in
make.height.equalTo(ifNeedExpandOutdoorResult ? Layout.resultLabelMaxHeight : Layout.resultLabelHeight)
}

if ifNeedExpandFeelingResult && ifNeedExpandOutdoorResult {
rectangleImageView.image = BitnagilGraphic.onboardingMaxRectangle
rectangleHeightConstraint?.update(offset: Layout.rectangleImageViewMaxHeight)
resultGraphicViewTopConstraint?.update(offset: Layout.resultGraphicViewTopMinSpacing)
} else if ifNeedExpandFeelingResult != ifNeedExpandOutdoorResult {
rectangleImageView.image = BitnagilGraphic.onboardingBigRectangle
rectangleHeightConstraint?.update(offset: Layout.rectangleImageViewMidHeight)
resultGraphicViewTopConstraint?.update(offset: Layout.resultGraphicViewTopMinSpacing)
} else {
rectangleImageView.image = BitnagilGraphic.onboardingRectangle
rectangleHeightConstraint?.update(offset: Layout.rectangleImageViewHeight)
resultGraphicViewTopConstraint?.update(offset: Layout.resultGraphicViewTopSpacing)
}

[timeResultView, feelingResultStackView, outdoorResultStackView].forEach {
resultStackView.addArrangedSubview($0)
}
}
Expand All @@ -296,6 +326,7 @@ final class OnboardingResultViewController: BaseViewController<OnboardingViewMod
}

guard let nextView else { return }
nextView.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(nextView, animated: true)
}
}
Loading