Skip to content

Commit

Permalink
refactor/#388 지각 꾸물이 뷰 하나로 합쳐지도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
youz2me committed Sep 16, 2024
1 parent cee7343 commit 89764bc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 35 deletions.
8 changes: 4 additions & 4 deletions KkuMulKum.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
DD43937C2C412F4500EC1799 /* InviteCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4393742C412F4500EC1799 /* InviteCodeViewController.swift */; };
DD43937D2C412F4500EC1799 /* CheckInviteCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4393752C412F4500EC1799 /* CheckInviteCodeViewController.swift */; };
DD43937F2C41357800EC1799 /* InviteCodeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */; };
DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909952C440CDC003ED304 /* ArriveView.swift */; };
DD4909962C440CDC003ED304 /* NoTardyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909952C440CDC003ED304 /* NoTardyView.swift */; };
DD8626612C4606A300E4F980 /* SetReadyInfoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626522C4606A300E4F980 /* SetReadyInfoViewModel.swift */; };
DD8626632C4606A300E4F980 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626552C4606A300E4F980 /* EnterReadyInfoButtonView.swift */; };
DD8626642C4606A300E4F980 /* ReadyPlanInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626562C4606A300E4F980 /* ReadyPlanInfoView.swift */; };
Expand Down Expand Up @@ -371,7 +371,7 @@
DD4393742C412F4500EC1799 /* InviteCodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InviteCodeViewController.swift; sourceTree = "<group>"; };
DD4393752C412F4500EC1799 /* CheckInviteCodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckInviteCodeViewController.swift; sourceTree = "<group>"; };
DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteCodeViewModel.swift; sourceTree = "<group>"; };
DD4909952C440CDC003ED304 /* ArriveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArriveView.swift; sourceTree = "<group>"; };
DD4909952C440CDC003ED304 /* NoTardyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoTardyView.swift; sourceTree = "<group>"; };
DD8626522C4606A300E4F980 /* SetReadyInfoViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetReadyInfoViewModel.swift; sourceTree = "<group>"; };
DD8626552C4606A300E4F980 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = "<group>"; };
DD8626562C4606A300E4F980 /* ReadyPlanInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyPlanInfoView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -803,7 +803,7 @@
DD41BEF92C41D4160095A068 /* TardyView.swift */,
DD41BEFB2C41D54D0095A068 /* TardyPenaltyView.swift */,
DD41BEFE2C41DAA40095A068 /* TardyEmptyView.swift */,
DD4909952C440CDC003ED304 /* ArriveView.swift */,
DD4909952C440CDC003ED304 /* NoTardyView.swift */,
);
path = View;
sourceTree = "<group>";
Expand Down Expand Up @@ -2039,7 +2039,7 @@
DE9E18802C3BA4AA00DB76B4 /* CustomButton.swift in Sources */,
DE0137D32C43C5E50088C777 /* MyPageView.swift in Sources */,
DE558C592C45954B008DAC4A /* SelectMemberViewController.swift in Sources */,
DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */,
DD4909962C440CDC003ED304 /* NoTardyView.swift in Sources */,
789196342C486F6B00FF8CDF /* KeychainAccessible.swift in Sources */,
DE254AB02C31195B00A4015E /* NSAttributedString+.swift in Sources */,
DD43937B2C412F4500EC1799 /* CreateMeetingViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
//
// ArriveView.swift
// NoTardyView.swift
// KkuMulKum
//
// Created by YOUJIM on 7/14/24.
//

import UIKit

class ArriveView: BaseView {
class NoTardyView: BaseView {


// MARK: Property

let finishMeetingButton: CustomButton = CustomButton(
title: "약속 마치기",
isEnabled: true
).then {
$0.backgroundColor = .maincolor
}

private let giftImageView: UIImageView = UIImageView().then {
$0.image = .imgGift
$0.contentMode = .scaleAspectFit
Expand All @@ -41,8 +34,7 @@ class ArriveView: BaseView {
addSubviews(
giftImageView,
mainTitleLabel,
subTitleLabel,
finishMeetingButton
subTitleLabel
)
}

Expand All @@ -63,12 +55,5 @@ class ArriveView: BaseView {
$0.top.equalTo(mainTitleLabel.snp.bottom).offset(4)
$0.centerX.equalToSuperview()
}

finishMeetingButton.snp.makeConstraints {
$0.bottom.equalToSuperview().inset(64)
$0.centerX.equalToSuperview()
$0.height.equalTo(CustomButton.defaultHeight)
$0.width.equalTo(CustomButton.defaultWidth)
}
}
}
7 changes: 7 additions & 0 deletions KkuMulKum/Source/Promise/Tardy/View/TardyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class TardyView: BaseView {

let tardyEmptyView: TardyEmptyView = TardyEmptyView()

let noTardyView: NoTardyView = NoTardyView()

let tardyCollectionView: UICollectionView = UICollectionView(
frame: .zero,
collectionViewLayout: UICollectionViewFlowLayout().then {
Expand Down Expand Up @@ -54,6 +56,7 @@ class TardyView: BaseView {
tardyPenaltyView,
titleLabel,
tardyEmptyView,
noTardyView,
tardyCollectionView,
finishMeetingButton
)
Expand All @@ -78,6 +81,10 @@ class TardyView: BaseView {
$0.width.equalTo(Screen.width(112))
}

noTardyView.snp.makeConstraints {
$0.edges.equalTo(safeAreaLayoutGuide)
}

finishMeetingButton.snp.makeConstraints {
$0.bottom.equalToSuperview().inset(64)
$0.centerX.equalToSuperview()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ class TardyViewController: BaseViewController {
// MARK: Property

let viewModel: PromiseViewModel
let tardyView: TardyView = TardyView()
let arriveView: ArriveView = ArriveView()
let rootView: TardyView = TardyView()


// MARK: - LifeCycle
Expand All @@ -29,6 +28,10 @@ class TardyViewController: BaseViewController {
fatalError("init(coder:) has not been implemented")
}

override func loadView() {
view = rootView
}

override func viewDidLoad() {
super.viewDidLoad()

Expand All @@ -44,18 +47,8 @@ class TardyViewController: BaseViewController {

// MARK: - Setup

override func setupView() {
view.addSubviews(arriveView, tardyView)

[arriveView, tardyView].forEach {
$0.snp.makeConstraints {
$0.edges.equalToSuperview()
}
}
}

override func setupDelegate() {
tardyView.tardyCollectionView.dataSource = self
rootView.tardyCollectionView.dataSource = self
}
}

Expand Down

0 comments on commit 89764bc

Please sign in to comment.