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
8 changes: 4 additions & 4 deletions Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
710660372D53B0B70065167A /* TextViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710660362D53B0B70065167A /* TextViewFactory.swift */; };
710660392D53B2510065167A /* UITextView+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710660382D53B2510065167A /* UITextView+.swift */; };
7119B8112CA72FBD00E94E62 /* UIColor+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7119B8102CA72FBD00E94E62 /* UIColor+.swift */; };
7121A1332C396FB40056DB8B /* CustomButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7121A1322C396FB40056DB8B /* CustomButton.swift */; };
7121A1352C39CCF60056DB8B /* UIButton+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7121A1342C39CCF60056DB8B /* UIButton+.swift */; };
7121A13A2C3A6CEB0056DB8B /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 7121A1392C3A6CEB0056DB8B /* RxCocoa */; };
7121A13C2C3A6CEB0056DB8B /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 7121A13B2C3A6CEB0056DB8B /* RxRelay */; };
Expand Down Expand Up @@ -124,6 +123,7 @@
71665AAC2C7C4A94008EB0D7 /* EventView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71665AAB2C7C4A94008EB0D7 /* EventView.swift */; };
71665AAE2C7C4BAA008EB0D7 /* CalendarDateCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71665AAD2C7C4BAA008EB0D7 /* CalendarDateCellView.swift */; };
71665AB12C7C5444008EB0D7 /* TNCalendarRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71665AB02C7C5444008EB0D7 /* TNCalendarRepository.swift */; };
717054FD2D696D7D00B3F2CD /* TerningCustomButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 717054FC2D696D7D00B3F2CD /* TerningCustomButton.swift */; };
71780C322C45705C0073B731 /* Encodable+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71780C312C45705C0073B731 /* Encodable+.swift */; };
71780C352C45725E0073B731 /* Providers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71780C342C45725E0073B731 /* Providers.swift */; };
71780C3A2C4577FF0073B731 /* CalendarTargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71780C392C4577FF0073B731 /* CalendarTargetType.swift */; };
Expand Down Expand Up @@ -281,7 +281,6 @@
710660362D53B0B70065167A /* TextViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextViewFactory.swift; sourceTree = "<group>"; };
710660382D53B2510065167A /* UITextView+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextView+.swift"; sourceTree = "<group>"; };
7119B8102CA72FBD00E94E62 /* UIColor+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+.swift"; sourceTree = "<group>"; };
7121A1322C396FB40056DB8B /* CustomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomButton.swift; sourceTree = "<group>"; };
7121A1342C39CCF60056DB8B /* UIButton+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+.swift"; sourceTree = "<group>"; };
7121A13D2C3A98E10056DB8B /* LabelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelFactory.swift; sourceTree = "<group>"; };
7121A13F2C3AB9EE0056DB8B /* JobDetailInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobDetailInfoView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -310,6 +309,7 @@
71665AAB2C7C4A94008EB0D7 /* EventView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventView.swift; sourceTree = "<group>"; };
71665AAD2C7C4BAA008EB0D7 /* CalendarDateCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarDateCellView.swift; sourceTree = "<group>"; };
71665AB02C7C5444008EB0D7 /* TNCalendarRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TNCalendarRepository.swift; sourceTree = "<group>"; };
717054FC2D696D7D00B3F2CD /* TerningCustomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TerningCustomButton.swift; sourceTree = "<group>"; };
71780C312C45705C0073B731 /* Encodable+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Encodable+.swift"; sourceTree = "<group>"; };
71780C342C45725E0073B731 /* Providers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Providers.swift; sourceTree = "<group>"; };
71780C392C4577FF0073B731 /* CalendarTargetType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarTargetType.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -961,7 +961,6 @@
isa = PBXGroup;
children = (
7121A1412C3AE99D0056DB8B /* Cell */,
7121A1322C396FB40056DB8B /* CustomButton.swift */,
2DAC9E7A2D112AC500A7842E /* CustomCheckButton.swift */,
2D89C7662C486E53002B035F /* CustomSortButton.swift */,
2D4EE3862C3D7CB200E3E95B /* CustomOnboardingButton.swift */,
Expand All @@ -974,6 +973,7 @@
7121A13F2C3AB9EE0056DB8B /* JobDetailInfoView.swift */,
719C6DED2C91F150006AF9C9 /* CustomAlertViewController.swift */,
71F004C62C957C8C00CD202B /* EmptyView.swift */,
717054FC2D696D7D00B3F2CD /* TerningCustomButton.swift */,
);
path = UIComponents;
sourceTree = "<group>";
Expand Down Expand Up @@ -1617,6 +1617,7 @@
files = (
2DC61F012C40825D009F991F /* DetailInfoTableViewCell.swift in Sources */,
2DC986062C45704600D46729 /* CustomSearchBar.swift in Sources */,
717054FD2D696D7D00B3F2CD /* TerningCustomButton.swift in Sources */,
715C0FD72C99077700EDDD60 /* MockCalendarService.swift in Sources */,
2DF257272C8F692B00B85843 /* ProfileViewModelType.swift in Sources */,
2DF257292C8F6A7D00B85843 /* ProfileImageUtils.swift in Sources */,
Expand Down Expand Up @@ -1735,7 +1736,6 @@
71B509252C41D027006D8E56 /* CalendarDateHeaderView.swift in Sources */,
2DC61F192C41B261009F991F /* LoginView.swift in Sources */,
2DD483802C4B37A0000541E3 /* AccountOptionViewController.swift in Sources */,
7121A1332C396FB40056DB8B /* CustomButton.swift in Sources */,
715C0FF12C9F256700EDDD60 /* JobDetailRepositoryInterface.swift in Sources */,
2D8CCF152D11122F0030E8E5 /* JobCategoryCell.swift in Sources */,
2D89C7652C486E2E002B035F /* SearchResultView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,17 @@ final class AccountOptionView: UIView {
$0.numberOfLines = 4
}

lazy var yesButton = CustomButton(
lazy var yesButton = TerningCustomButton(
title: "로그아웃하기",
font: .button2,
cornerRadius: 10.adjustedH
radius: 10.adjustedH
)

lazy var noButton = CustomButton(
lazy var noButton = TerningCustomButton(
title: "취소",
font: .button2,
cornerRadius: 10.adjustedH
).then {
$0.setColor(bgColor: .grey150, disableColor: .grey150, textColor: .grey400)
}
radius: 10.adjustedH
)

// MARK: - Init

Expand Down Expand Up @@ -73,6 +71,8 @@ extension AccountOptionView {
yesButton,
noButton
)

noButton.setAppearance(normalBackgroundColor: .grey100, pressedBackgroundColor: .grey200, textNormal: .grey400)
}

private func setLayout() {
Expand Down Expand Up @@ -111,10 +111,10 @@ extension AccountOptionView {
func bind(for viewType: AccountOption) {
if viewType == .logout {
subTitleLabel.text = "정말 로그아웃 하시겠어요?"
yesButton.setTitle(title: "로그아웃하기")
yesButton.updateTitle("로그아웃하기")
} else {
subTitleLabel.text = "탈퇴 시 계정 및 이용 기록은 모두 삭제되며,\n삭제된 데이터는 복구가 불가능합니다.\n\n탈퇴를 진행할까요?"
yesButton.setTitle(title: "탈퇴하기")
yesButton.updateTitle("탈퇴하기")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ extension TNCalendarViewController {
})
.disposed(by: disposeBag)


output.dailyData
.drive(onNext: { [weak self] _ in
guard let self = self else { return }
Expand All @@ -175,7 +174,6 @@ extension TNCalendarViewController {
})
.disposed(by: disposeBag)


output.patchScrapResult
.drive(onNext: { [weak self] in
guard let self = self else { return }
Expand All @@ -192,7 +190,6 @@ extension TNCalendarViewController {
})
.disposed(by: disposeBag)


output.error
.drive(onNext: { [weak self] errorMessage in
guard let self = self else { return }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ final class FilteringViewController: UIViewController {
return [jobVC, planVC]
}()

private let saveButton = CustomButton(title: "저장하기")
private let saveButton = TerningCustomButton(title: "저장하기")

// MARK: - Init

Expand Down
5 changes: 5 additions & 0 deletions Terning-iOS/Terning-iOS/Presentation/Home/View/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ extension HomeView {
self.userName = userName

// 새로운 레이아웃 생성 및 적용
let topOffset = userName.count > 6 ? 198.adjustedH : 176.adjustedH

gradientLayerView.snp.updateConstraints {
$0.top.equalToSuperview().offset(topOffset)
}

DispatchQueue.main.async { [weak self] in
let newLayout = CompositionalLayout.createHomeCollectionViewLayout(hasScrapped: hasScrapped, soonData: soonData, userName: userName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ final class JobDetailView: UIView {
tableView.showsVerticalScrollIndicator = false
return tableView
}()

private let bottomView = UIView().then {
$0.backgroundColor = .white
$0.layer.shadowColor = UIColor.black.cgColor
Expand All @@ -55,8 +55,7 @@ final class JobDetailView: UIView {
$0.setImage(.icScrapFill, for: [.selected, .highlighted])
}

private var goSiteButton = CustomButton(title: "지원 사이트로 이동하기")
.setCornerRadius(10)
private var goSiteButton = TerningCustomButton(title: "지원 사이트로 이동하기", font: .button2, radius: 10)

// MARK: - Init

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ final class OnboardingView: UIView {

let customDatePicker = CustomDatePicker()

lazy var nextButton = CustomButton(title: "다음으로")
lazy var nextButton = TerningCustomButton(title: "다음으로")

// MARK: - Init

Expand All @@ -107,11 +107,6 @@ final class OnboardingView: UIView {

extension OnboardingView {
private func setUI(viewType: OnboardingViewType) {
nextButton.setColor(
bgColor: .terningMain,
disableColor: .grey200
)

addSubviews(
navigationBar,
progressView,
Expand Down Expand Up @@ -152,7 +147,7 @@ extension OnboardingView {

nextButton.snp.makeConstraints {
$0.height.equalTo(54.adjustedH)
$0.horizontalEdges.equalToSuperview().inset(-5.adjusted)
$0.horizontalEdges.equalToSuperview()
$0.bottom.equalToSuperview().inset(12.adjustedH)
}

Expand Down Expand Up @@ -310,27 +305,27 @@ extension OnboardingView {
sender.selectButton()

let stringValue: String?
switch viewType {
case .grade:
switch sender.index {
case 0: stringValue = "freshman"
case 1: stringValue = "sophomore"
case 2: stringValue = "junior"
case 3: stringValue = "senior"
default: stringValue = nil
}

case .workingPeriod:
switch sender.index {
case 0: stringValue = "short"
case 1: stringValue = "middle"
case 2: stringValue = "long"
default: stringValue = nil
}

case .graduationDate:
stringValue = nil
switch viewType {
case .grade:
switch sender.index {
case 0: stringValue = "freshman"
case 1: stringValue = "sophomore"
case 2: stringValue = "junior"
case 3: stringValue = "senior"
default: stringValue = nil
}

case .workingPeriod:
switch sender.index {
case 0: stringValue = "short"
case 1: stringValue = "middle"
case 2: stringValue = "long"
default: stringValue = nil
}

case .graduationDate:
stringValue = nil
}

updateOnboardingData(for: viewType, with: stringValue)
optionSelectedSubject.onNext(sender.index)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ final class ProfileView: UIView {
characterSpacing: 0.002
)

let saveButton = CustomButton(title: "저장하기")
let saveButton = TerningCustomButton(title: "저장하기")

// MARK: - Init

Expand Down Expand Up @@ -201,7 +201,7 @@ extension ProfileView {
}
saveButton.snp.makeConstraints {
$0.height.equalTo(54.adjustedH)
$0.horizontalEdges.equalToSuperview().inset(-5.adjusted)
$0.horizontalEdges.equalToSuperview()
$0.bottom.equalToSuperview().inset(44.adjustedH)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ final class WelcomeView: UIView {
$0.loopMode = .loop
$0.animationSpeed = 1
}

private let startButton = CustomButton(title: "시작하기", font: .button0).then {
private let startButton = TerningCustomButton(title: "시작하기", radius: 10).then {
$0.alpha = 0.0
}

private let skipButton = UIButton().then {
$0.backgroundColor = .clear
$0.tintColor = .grey500

let title = "계획 나중에 입력하기"
let attributedTitle = NSAttributedString(
string: title,
Expand All @@ -51,7 +51,7 @@ final class WelcomeView: UIView {
}.then {
$0.alpha = 0.0
}

// MARK: - Init

init(viewType: WelcomeViewType) {
Expand All @@ -66,9 +66,9 @@ final class WelcomeView: UIView {
fatalError("init(coder:) has not been implemented")
}
}
// MARK: - UI & Layout

// MARK: - UI & Layout

extension WelcomeView {
private func setUI(viewType: WelcomeViewType) {
switch viewType {
Expand All @@ -77,7 +77,7 @@ extension WelcomeView {
let animation = LottieAnimation.named("beforeOnboarding")
logoAnimationView.animation = animation
logoAnimationView.play()
startButton.setTitle(title: "시작하기")
startButton.updateTitle("시작하기")
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
UIView.animate(withDuration: 0.5) {
self.skipButton.alpha = 1.0
Expand All @@ -88,7 +88,7 @@ extension WelcomeView {
let animation = LottieAnimation.named("afterOnboarding")
logoAnimationView.animation = animation
logoAnimationView.play()
startButton.setTitle(title: "내 맞춤 공고 바로 보러가기")
startButton.updateTitle("내 맞춤 공고 바로 보러가기")
}

DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ final class CustomAlertViewController: UIViewController {
$0.spacing = 5.adjustedH
}

private let centerButton = CustomButton(title: "내 캘린더에 스크랩하기", font: .button3)
private let changeColorButton = CustomButton(title: "색상 변경하기", font: .button3).setEnabled(false).setAlertViewColor()
private let viewJobDetailButton = CustomButton(title: "공고 상세 정보 보기", font: .button3)
private let centerButton = TerningCustomButton(title: "내 캘린더에 스크랩하기", font: .button3, radius: 5)
private let changeColorButton = TerningCustomButton(title: "색상 변경하기", font: .button3, radius: 5).setEnabled(false)
private let viewJobDetailButton = TerningCustomButton(title: "공고 상세 정보 보기", font: .button3, radius: 5)
private let closeButton = UIButton()

private let alertView = UIView()
Expand Down Expand Up @@ -256,6 +256,16 @@ final class CustomAlertViewController: UIViewController {
private func setChangeColorAndPushJobDetailLayout() {
centerButton.isHidden = true

if !changeColorButton.isEnabled {
changeColorButton.makeBorder(width: 1, color: .grey150, cornerRadius: 5)
changeColorButton.clipsToBounds = true
}

changeColorButton.setAppearance(
disabledBackgroundColor: .white,
textDisabled: .grey375
)

changeColorButton.snp.makeConstraints {
$0.top.equalTo(detailsVStackView.snp.bottom).offset(20.adjustedH)
$0.leading.equalToSuperview().inset(16.adjusted)
Expand Down Expand Up @@ -287,7 +297,7 @@ final class CustomAlertViewController: UIViewController {
$0.centerX.equalToSuperview()
}

centerButton.setTitle(title: "스크랩 취소하기")
centerButton.updateTitle("스크랩 취소하기")

centerButton.snp.makeConstraints {
$0.bottom.equalToSuperview().inset(16.adjustedH)
Expand Down
Loading