diff --git a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj index 16c57433..d7a3f226 100644 --- a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj +++ b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj @@ -298,7 +298,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.heartz.ByeBoo-iOS"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.heartz.ByeBoo-iOS"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development com.heartz.ByeBoo-iOS"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; diff --git a/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift b/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift index 97d46269..2bfd6126 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Data/Persistence/Service/TokenService.swift @@ -9,20 +9,37 @@ import Foundation import Alamofire -protocol TokenService { +protocol TokenService: Sendable { func reissue() async throws } -final class DefaultTokenService: TokenService { + +actor DefaultTokenService: TokenService { + private var tokenTask: Task? private let keychainService: KeychainService - init( - keychainService: KeychainService - ) { + + init(keychainService: KeychainService) { self.keychainService = keychainService } func reissue() async throws { + + if let task = tokenTask { + return try await task.value + } + + let task = Task { + try await fetchAuthReissue() + } + + tokenTask = task + defer { tokenTask = nil } + + return try await task.value + } + + private func fetchAuthReissue() async throws { let header: HeaderType = .withAuth(acessToken: keychainService.load(key: .refreshToken)) ByeBooLogger.debug("토큰 재발급 시작") @@ -39,6 +56,8 @@ final class DefaultTokenService: TokenService { .validate() .responseDecodable(of: BaseResponse.self) { [weak self] response in guard let self else { return } + ByeBooLogger.debug("💡Reissue \(response)") + switch response.result { case .success(let data): guard let data = data.data else { @@ -46,39 +65,44 @@ final class DefaultTokenService: TokenService { continuation.resume(throwing: ByeBooError.noData) return } - ByeBooLogger.debug("토큰 재발급 완료") - self.keychainService.save(key: .accessToken, token: data.accessToken) - self.keychainService.save(key: .refreshToken, token: data.refreshToken) - continuation.resume(returning: ()) - case .failure(let error): - ByeBooLogger.debug("토큰 재발급 실패, 키체인 삭제 후 로그인으로 이동") - self.clearKeychain() - DispatchQueue.main.async { - NotificationCenter.default.post(name: .navigateLoginViewController, object: nil) + + Task { + await self.debugTokenReissueSuccess(data) + continuation.resume(returning: ()) } - if let data = response.data, - let statusCode = response.response?.statusCode, - let errorResponse = try? JSONDecoder().decode(EmptyResponse.self, from: data) { - ByeBooLogger.error(error) + + case .failure(let error): + Task { + await self.debugTokenReissueFailure() continuation.resume(throwing: error) - } else { - ByeBooLogger.error(ByeBooError.decodingError) - continuation.resume(throwing: ByeBooError.decodingError) } } } } } -} - -extension DefaultTokenService { + + private func debugTokenReissueSuccess(_ data: TokenReissueResponseDTO) { + ByeBooLogger.debug("토큰 재발급 완료") + self.keychainService.save(key: .accessToken, token: data.accessToken) + self.keychainService.save(key: .refreshToken, token: data.refreshToken) + } + + private func debugTokenReissueFailure() { + ByeBooLogger.debug("토큰 재발급 실패, 키체인 삭제 후 로그인으로 이동") + clearKeychain() + DispatchQueue.main.async { + NotificationCenter.default.post(name: .navigateLoginViewController, object: nil) + } + } + private func clearKeychain() { for key in KeyType.allCases { let token = keychainService.load(key: key) - if !token.isEmpty { - keychainService.delete(key: key) - ByeBooLogger.debug("\(key) 삭제") + if !token.isEmpty { + keychainService.delete(key: key) + ByeBooLogger.debug("\(key) 삭제") } } } + } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift b/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift index c6d2c9b3..985db17f 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Data/Repository/AuthRepository.swift @@ -98,7 +98,7 @@ struct DefaultAuthRepository: AuthInterface { func autoLogin() async throws -> Bool { let isOnboardingCompleted: Bool = userDefaultsService.load(key: .isOnboardingCompleted) ?? false - ByeBooLogger.debug(isOnboardingCompleted) + ByeBooLogger.debug("온보딩 여부 \(isOnboardingCompleted)") if !keychainService.load(key: .accessToken).isEmpty && !keychainService.load(key: .refreshToken).isEmpty @@ -214,7 +214,7 @@ final class MockAuthRepository: AuthInterface { func appleLogin(platform: LoginPlatform) async throws { appleLoginCalled = true - var (identityToken, authorizationCode) = try await network.appleRequest() + let (identityToken, authorizationCode) = try await network.appleRequest() let _ = userDefaultsService.save("APPLE", key: .loginPlatform) keychainService.save(key: .authorization, token: identityToken) keychainService.save(key: .authorizationCode, token: authorizationCode) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooButton.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooButton.swift index b794c17e..e48c69b3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooButton.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooButton.swift @@ -25,7 +25,7 @@ enum ByeBooButtonType { case .enabled: .primary300 case .disabled: - .white10 + .white5 case .disabled2: .black50 } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooNicknameTextField.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooNicknameTextField.swift index 90e1ab3d..f5b0d6aa 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooNicknameTextField.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ByeBooNicknameTextField.swift @@ -66,7 +66,7 @@ final class ByeBooNicknameTextField: BaseView { override func setStyle() { nicknameField.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.layer.cornerRadius = 12.adjustedW $0.attributedPlaceholder = NSAttributedString( string: "닉네임을 입력해주세요", @@ -79,7 +79,7 @@ final class ByeBooNicknameTextField: BaseView { $0.autocapitalizationType = .none } deleteAllTextButton.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.setImage(.union.withTintColor(.white).resize(newWidth: 10.adjustedW), for: .normal) $0.layer.cornerRadius = 9 $0.isHidden = true diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionBottomSheetView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionBottomSheetView.swift index 2957181d..7002db7b 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionBottomSheetView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionBottomSheetView.swift @@ -19,7 +19,7 @@ final class EmotionBottomSheetView: BaseView { private let emotionChipFirstStackView = UIStackView() private let emotionChipSecondStackView = UIStackView() - let confirmButton = ByeBooButton(titleText: "완료", type: .disabled) + let confirmButton = ByeBooButton(titleText: "완료하기", type: .disabled) var emotionChips: [ByeBooEmotionChip] = [] override func setUI() { @@ -49,13 +49,13 @@ final class EmotionBottomSheetView: BaseView { override func setStyle() { backgroundColor = .grayscale900 - titleLabel.do { - $0.text = "퀘스트를 완료한 후,\n어떤 감정이 느껴지시나요?" - $0.numberOfLines = 2 - $0.font = FontManager.head1M24.font - $0.textColor = .grayscale50 - $0.textAlignment = .center - } + titleLabel.applyByeBooFont( + style: .head2M22, + text: "퀘스트를 완료한 후,\n어떤 감정이 느껴지시나요?", + color: .grayscale50, + textAlignment: .center, + numberOfLines: 2 + ) warningStackView.do { $0.axis = .horizontal @@ -67,11 +67,11 @@ final class EmotionBottomSheetView: BaseView { $0.contentMode = .scaleAspectFit } - warningLabel.do { - $0.text = "퀘스트 완료 후에는 감정을 수정할 수 없어요" - $0.font = FontManager.cap2R12.font - $0.textColor = .grayscale400 - } + warningLabel.applyByeBooFont( + style: .cap2R12, + text: "퀘스트 완료 후에는 감정을 수정할 수 없어요", + color: .grayscale400 + ) [emotionChipFirstStackView, emotionChipSecondStackView].forEach { $0.do { @@ -85,7 +85,7 @@ final class EmotionBottomSheetView: BaseView { titleLabel.snp.makeConstraints { $0.top.equalToSuperview().offset(53.adjustedH) $0.centerX.equalToSuperview() - $0.height.equalTo(62.adjustedH) +// $0.height.equalTo(62.adjustedH) } warningStackView.snp.makeConstraints { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionChip.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionChip.swift index 548f0fbb..04ebde53 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionChip.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/EmotionBottomSheet/EmotionChip.swift @@ -20,7 +20,7 @@ enum EmotionChipState { case .selected: return .primary30020 case .unselected, .defaultState: - return .white10 + return .white5 } } @@ -52,6 +52,15 @@ enum EmotionChipState { return 0.5 } } + + var font: FontManager { + switch self { + case .selected: + return FontManager.body4Sb14 + case .defaultState, .unselected: + return FontManager.body5M14 + } + } } final class ByeBooEmotionChip: BaseView { @@ -88,11 +97,11 @@ final class ByeBooEmotionChip: BaseView { $0.isUserInteractionEnabled = true } - emotionTag.do { - $0.textAlignment = .center - $0.textColor = chipState.textColor - $0.font = FontManager.body4Sb14.font - } + emotionTag.applyByeBooFont( + style: chipState.font, + color: chipState.textColor, + textAlignment: .center + ) } override func setLayout() { @@ -126,11 +135,20 @@ extension ByeBooEmotionChip { func updateEmotion(_ emotionType: ByeBooEmotion) { self.emotionType = emotionType self.emotionImage.image = emotionType.emotionImage.image - self.emotionTag.text = emotionType.emotionText + emotionTag.applyByeBooFont( + style: chipState.font, + text: emotionType.emotionText, + color: chipState.textColor, + textAlignment: .center + ) } func updateChipUI() { - self.emotionTag.textColor = chipState.textColor + emotionTag.applyByeBooFont( + style: chipState.font, + color: chipState.textColor, + textAlignment: .center + ) self.backgroundColor = chipState.backgroundColor self.layer.borderColor = chipState.borderColor.cgColor self.layer.opacity = chipState.backgroundOpacity diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/ConfirmModalView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/ConfirmModalView.swift index d3269d0b..37528a85 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/ConfirmModalView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/ConfirmModalView.swift @@ -60,20 +60,24 @@ final class ConfirmModalView: BaseView, ModalProtocol { $0.backgroundColor = .grayscale90080 $0.layer.cornerRadius = 12 } - titleLabel.do { - $0.font = FontManager.sub3M18.font - $0.textColor = .grayscale50 - $0.textAlignment = .center - } - descriptionLabel.do { - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale400 - $0.textAlignment = .center - } + + titleLabel.applyByeBooFont( + style: .sub3M18, + color: .grayscale50, + textAlignment: .center + ) + + descriptionLabel.applyByeBooFont( + style: .body3R16, + color: .grayscale400, + textAlignment: .center + ) + buttonStackView.do { $0.axis = .horizontal $0.spacing = 16 } + setBlurEffect() } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/CongrateModalView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/CongrateModalView.swift index 1ec75529..c48fcb4c 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/CongrateModalView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/CongrateModalView.swift @@ -21,34 +21,35 @@ final class CongrateModalView: BaseView, ModalProtocol { private let secondDescriptionLabel = UILabel() override func setStyle() { - backgroundColor = .grayscale90080 + backgroundColor = .grayscale900 layer.cornerRadius = 12 + + descriptionLabel.applyByeBooFont( + style: .body3R16, + text: "축하드려요!", + color: .grayscale400, + textAlignment: .center + ) + + titleLabel.applyByeBooFont( + style: .sub2Sb18, + text: "감정 직면 여정을\n모두 마무리 했어요", + color: .grayscale50, + textAlignment: .center, + numberOfLines: 2 + ) - descriptionLabel.do { - $0.text = "축하드려요!" - $0.textAlignment = .center - $0.textColor = .grayscale400 - $0.font = FontManager.body3R16.font - } - titleLabel.do { - $0.text = "감정 직면 여정을\n모두 마무리 했어요" - $0.numberOfLines = 2 - $0.textAlignment = .center - $0.textColor = .grayscale50 - $0.font = FontManager.sub2Sb18.font - } imageView.do { $0.image = .clover } - secondDescriptionLabel.do { - $0.text = "보리가 하츠핑님께\n하고싶은 말이 있다고 해요." - $0.numberOfLines = 2 - $0.textAlignment = .center - $0.textColor = .grayscale400 - $0.font = FontManager.body3R16.font - } - setBlurEffect() + secondDescriptionLabel.applyByeBooFont( + style: .body3R16, + text: "보리가 하츠핑님께\n하고싶은 말이 있다고 해요.", + color: .grayscale400, + textAlignment: .center, + numberOfLines: 2 + ) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuestModalView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuestModalView.swift index 6bec899a..e5e1a9e5 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuestModalView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuestModalView.swift @@ -18,7 +18,7 @@ final class QuestModalView: BaseView, ModalProtocol { private let imageView = UIImageView() private let questLabel = UILabel() private let titleLabel = UILabel() - let tipButton = UIButton() + let tipButton = ByeBooTipTag() private var questNumber: Int private var quest: String @@ -35,7 +35,7 @@ final class QuestModalView: BaseView, ModalProtocol { override func setStyle() { self.do { - $0.backgroundColor = .grayscale90080 + $0.backgroundColor = .grayscale900 $0.layer.cornerRadius = 12.adjustedW } @@ -46,32 +46,23 @@ final class QuestModalView: BaseView, ModalProtocol { $0.layer.cornerRadius = 12.adjustedW } - questLabel.do { - $0.text = "\(questNumber)번째 퀘스트" - $0.textColor = .grayscale400 - $0.textAlignment = .center - $0.font = FontManager.body3R16.font - } + questLabel.applyByeBooFont( + style: .body3R16, + text: "\(questNumber)번째 퀘스트", + color: .grayscale400, + textAlignment: .center + ) titleLabel.do { - $0.text = quest - $0.textColor = .grayscale50 - $0.textAlignment = .center - $0.numberOfLines = 0 + $0.applyByeBooFont( + style: .sub3M18, + text: quest, + color: .grayscale50, + textAlignment: .center, + numberOfLines: 0 + ) $0.lineBreakMode = .byWordWrapping - $0.font = FontManager.sub3M18.font - } - - tipButton.do { - $0.setTitle("작성 TIP", for: .normal) - $0.titleLabel?.font = FontManager.body6R14.font - $0.backgroundColor = .clear - $0.setTitleColor(.grayscale300, for: .normal) - $0.layer.cornerRadius = 12.adjustedW - $0.setUnderLine() } - - setBlurEffect() } override func setUI() { @@ -93,27 +84,24 @@ final class QuestModalView: BaseView, ModalProtocol { } questLabel.snp.makeConstraints { - $0.top.equalTo(imageView.snp.bottom).offset(17.5.adjustedH) + $0.top.equalTo(imageView.snp.bottom).offset(12.adjustedH) $0.centerX.equalToSuperview() - $0.width.equalTo(200.adjustedW) - $0.height.equalTo(21.adjustedH) + $0.horizontalEdges.equalToSuperview().inset(32.adjustedW) } titleLabel.snp.makeConstraints { $0.top.equalTo(questLabel.snp.bottom).offset(8.adjustedH) $0.centerX.equalToSuperview() - $0.horizontalEdges.equalToSuperview().inset(24.adjustedW) + $0.horizontalEdges.equalToSuperview().inset(32.adjustedW) } tipButton.snp.makeConstraints { - $0.top.equalTo(titleLabel.snp.bottom).offset(16.adjustedH) + $0.top.equalTo(titleLabel.snp.bottom).offset(12.adjustedH) $0.centerX.equalToSuperview() - $0.width.equalTo(200.adjustedW) - $0.height.equalTo(18.adjustedH) } actionButton.snp.makeConstraints { - $0.top.equalTo(tipButton.snp.bottom).offset(17.5.adjustedH) + $0.top.equalTo(tipButton.snp.bottom).offset(24.adjustedH) $0.centerX.equalToSuperview() $0.horizontalEdges.equalToSuperview().inset(24.adjustedW) $0.height.equalTo(53.adjustedH) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuitModalView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuitModalView.swift index 0f477f28..cc11b51e 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuitModalView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Modal/QuitModalView.swift @@ -19,7 +19,7 @@ final class QuitModalView: BaseView, ModalProtocol { let actionButton = ByeBooButton(titleText: "나가기", type: .outline) override func setUI() { - backgroundColor = .grayscale90080 + backgroundColor = .grayscale900 layer.cornerRadius = 12 addSubviews( @@ -34,26 +34,24 @@ final class QuitModalView: BaseView, ModalProtocol { } override func setStyle() { - titleLabel.do { - $0.text = "작성을 중단하시겠어요?" - $0.font = FontManager.sub3M18.font - $0.textColor = .grayscale50 - $0.textAlignment = .center - } + titleLabel.applyByeBooFont( + style: .sub3M18, + text: "작성을 중단하시겠어요?", + color: .grayscale50, + textAlignment: .center + ) - secondDescriptionLabel.do { - $0.text = "작성하시던 내용은 저장되지 않아요." - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale400 - $0.textAlignment = .center - } + secondDescriptionLabel.applyByeBooFont( + style: .body3R16, + text: "작성하시던 내용은 저장되지 않아요.", + color: .grayscale400, + textAlignment: .center + ) buttonStackView.do { $0.axis = .horizontal $0.spacing = 16 } - - setBlurEffect() } override func setLayout() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/NicknameStateView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/NicknameStateView.swift index 5458fc6c..e6fae030 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/NicknameStateView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/NicknameStateView.swift @@ -16,20 +16,23 @@ final class NicknameStateView: BaseView { override func setStyle() { nicknameStateView.backgroundColor = .clear - stateLabel.do { - $0.text = NicknameState.normal.rawValue - $0.textColor = .grayscale400 - $0.font = FontManager.cap2R12.font - } + + stateLabel.applyByeBooFont( + style: .cap2R12, + text: NicknameState.normal.rawValue, + color: .grayscale400 + ) + errorIconImageView.do { $0.image = .error } - letterCountLabel.do { - $0.text = "0/5" - $0.textColor = .grayscale400 - $0.textAlignment = .right - $0.font = FontManager.cap2R12.font - } + + letterCountLabel.applyByeBooFont( + style: .cap2R12, + text: "0/5", + color: .grayscale400, + textAlignment: .right + ) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/SectionDividerView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/SectionDividerView.swift index 532c673a..e711bd62 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/SectionDividerView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/SectionDividerView.swift @@ -13,7 +13,7 @@ final class SectionDividerView: BaseView { override func setStyle() { dividerView.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Tag/ByeBooFilledTag.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Tag/ByeBooFilledTag.swift index 00a9a401..7574ac5b 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Tag/ByeBooFilledTag.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Tag/ByeBooFilledTag.swift @@ -24,7 +24,7 @@ enum ByeBooFilledTagType { case .largePurple, .word3Purple, .smallPurple: return .primary300 case .largeGray, .word3Gray, .smallGray : - return .white10 + return .white5 case .yelloFilled: return .secondary30010 } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Tag/ByeBooTipTag.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Tag/ByeBooTipTag.swift new file mode 100644 index 00000000..24463e38 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/Tag/ByeBooTipTag.swift @@ -0,0 +1,44 @@ +// +// ByeBooTipTag.swift +// ByeBoo-iOS +// +// Created by 이나연 on 2/13/26. +// + +import UIKit + +import SnapKit +import Then + +final class ByeBooTipTag: UIButton { + override init(frame: CGRect) { + super.init(frame: frame) + setStyle() + setLayout() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func setStyle() { + self.do { + $0.applyByeBooFont( + style: .cap1M12, + text: "작성 TIP", + color: .primary200 + ) + $0.backgroundColor = .white5 + $0.layer.cornerRadius = 12.adjustedW + $0.layer.borderColor = UIColor.grayscale800.cgColor + $0.layer.borderWidth = 1 + } + } + + private func setLayout() { + self.snp.makeConstraints { + $0.width.equalTo(76.adjustedW) + $0.height.equalTo(24.adjustedH) + } + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/IconOneLineTextView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/IconOneLineTextView.swift index c5504d22..a75722b3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/IconOneLineTextView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/IconOneLineTextView.swift @@ -53,10 +53,7 @@ final class IconOneLineTextView: BaseView { $0.contentMode = .scaleAspectFit } - textLabel.do { - $0.font = FontManager.body2M16.font - $0.textColor = .grayscale200 - } + textLabel.applyByeBooFont(style: .body2M16, color: .grayscale200) } override func setLayout() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OnboardingTextView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OnboardingTextView.swift index 07b35d00..447f76f9 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OnboardingTextView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OnboardingTextView.swift @@ -26,11 +26,11 @@ final class OnboardingTextView: BaseView { backgroundColor = .primary50 layer.cornerRadius = 12 - titleLabel.do { - $0.text = text - $0.font = FontManager.body6R14.font - $0.textColor = .primary400 - } + titleLabel.applyByeBooFont( + style: .body6R14, + text: self.text, + color: .primary400 + ) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OneLineTextBoxView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OneLineTextBoxView.swift index c08d1c0e..78df5cd3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OneLineTextBoxView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/OneLineTextBoxView.swift @@ -43,23 +43,19 @@ final class OneLineTextBoxView: BaseView { override func setStyle() { layer.cornerRadius = 12 - backgroundColor = .white10 + backgroundColor = .white5 if isHighlighted { layer.borderWidth = 1 layer.borderColor = UIColor(.primary300).cgColor } - titleLabel.do { - $0.numberOfLines = 1 - $0.isUserInteractionEnabled = false - $0.font = FontManager.body3R16.font - if isHighlighted { - $0.textColor = .grayscale50 - } else { - $0.textColor = .grayscale300 - } - } + titleLabel.applyByeBooFont( + style: .body3R16, + color: isHighlighted ? .grayscale50 : .grayscale300, + numberOfLines: 1 + ) + titleLabel.isUserInteractionEnabled = false } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/SpeechTextBoxView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/SpeechTextBoxView.swift index 4fe495f8..5ae160cf 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/SpeechTextBoxView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/SpeechTextBoxView.swift @@ -31,10 +31,7 @@ final class SpeechTextBoxView: BaseView { $0.clipsToBounds = false } - titleLabel.do { - $0.font = FontManager.body2M16.font - $0.textColor = .primary50 - } + titleLabel.applyByeBooFont(style: .body2M16, color: .primary50) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/TextBoxView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/TextBoxView.swift index 9aae19d4..bdf77807 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/TextBoxView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/TextView/TextBoxView.swift @@ -37,14 +37,14 @@ final class TextBoxView: BaseView { override func setStyle() { layer.cornerRadius = 12 - backgroundColor = .white10 + backgroundColor = .white5 - titleLabel.do { - $0.numberOfLines = 0 - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale300 - $0.lineBreakMode = .byCharWrapping - } + titleLabel.applyByeBooFont( + style: .body6R14, + color: .grayscale300, + numberOfLines: 0 + ) + titleLabel.lineBreakMode = .byCharWrapping } override func setUI() { @@ -74,11 +74,21 @@ final class TextBoxView: BaseView { extension TextBoxView { func updateText(_ text: String) { - titleLabel.text = text + titleLabel.applyByeBooFont( + style: .body6R14, + text: text, + color: .grayscale300, + numberOfLines: 0 + ) } func updateEmotionText(_ emotionState: String, text: String){ - self.titleLabel.text = text + titleLabel.applyByeBooFont( + style: .body6R14, + text: text, + color: .grayscale300, + numberOfLines: 0 + ) self.emotionChip?.updateEmotion(ByeBooEmotion.toEmotion(text: emotionState)) } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ToastMessageView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ToastMessageView.swift index 0fe4c611..2e84d2f8 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ToastMessageView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Common/ToastMessageView.swift @@ -31,10 +31,8 @@ final class ToastMessageView: BaseView { $0.layer.shadowRadius = 4 $0.layer.shadowOffset = CGSize(width: 0, height: 4) } - textLabel.do { - $0.textColor = .grayscale50 - $0.font = FontManager.body6R14.font - } + + textLabel.applyByeBooFont(style: .body6R14, color: .grayscale50) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/QuestState.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/QuestState.swift index fd49f205..67971027 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/QuestState.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/QuestState.swift @@ -14,7 +14,7 @@ enum QuestState { var backgroundColor: UIColor { switch self { case .completed, .upComing, .locked: - return .white10 + return .white5 case .ongoing: return .primary30020 } @@ -29,7 +29,7 @@ enum QuestState { case .upComing: return .secondary300 case .locked: - return .white10 + return .white5 } } @@ -67,7 +67,7 @@ enum QuestState { var tintColor: UIColor { switch self { case .upComing, .locked: - return .white10 + return .white5 case .completed, .ongoing: return .clear } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UIButton+.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UIButton+.swift index 498e2efe..f3a570e7 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UIButton+.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UIButton+.swift @@ -21,4 +21,26 @@ extension UIButton { setAttributedTitle(attributedString, for: .normal) } + + func applyByeBooFont( + style: FontManager, + text: String? = nil, + color: UIColor, + for state: UIControl.State = .normal) { + titleLabel?.font = style.font + titleLabel?.textColor = color + let targetText = text ?? title(for: state) + guard let targetText else { return } + + var attributes: [NSAttributedString.Key: Any] = [ + .font: style.font, + .kern: style.kern + ] + + if let titleColor = titleColor(for: state) { + attributes[.foregroundColor] = titleColor + } + + setAttributedTitle(NSAttributedString(string: targetText, attributes: attributes), for: state) + } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UILabel+.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UILabel+.swift index b11dd80f..4424c4d1 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UILabel+.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UILabel+.swift @@ -16,4 +16,37 @@ extension UILabel { ], range: NSString(string: text).range(of: text)) self.attributedText = attributedString } + + func applyByeBooFont( + style: FontManager, + text: String? = nil, + color: UIColor, + textAlignment: NSTextAlignment? = nil, + numberOfLines: Int? = nil + ) { + if let text { self.text = text } + self.textColor = color + if let textAlignment { self.textAlignment = textAlignment } + if let numberOfLines { self.numberOfLines = numberOfLines } + + font = style.font + let targetText = text ?? self.text + + guard let targetText else { return } + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.minimumLineHeight = style.lineHeight + paragraphStyle.maximumLineHeight = style.lineHeight + paragraphStyle.alignment = self.textAlignment + + let attributes: [NSAttributedString.Key: Any] = [ + .font: style.font, + .paragraphStyle: paragraphStyle, + .baselineOffset: (style.lineHeight - style.font.lineHeight) / 2, + .foregroundColor: textColor as Any, + .kern: style.kern + ] + + attributedText = NSAttributedString(string: targetText, attributes: attributes) + } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UITextView+.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UITextView+.swift new file mode 100644 index 00000000..fc1ada6e --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Extension/UITextView+.swift @@ -0,0 +1,41 @@ +// +// UITextView+.swift +// ByeBoo-iOS +// +// Created by 이나연 on 2/13/26. +// + +import Foundation +import UIKit + +extension UITextView { + func applyByeBooFont( + style: FontManager, + text: String? = nil, + color: UIColor + ) { + font = style.font + let targetText = text ?? self.text + self.textColor = color + + guard let targetText else { return } + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.minimumLineHeight = style.lineHeight + paragraphStyle.maximumLineHeight = style.lineHeight + + var attributes: [NSAttributedString.Key: Any] = [ + .font: style.font, + .paragraphStyle: paragraphStyle, + .baselineOffset: (style.lineHeight - style.font.lineHeight) / 2, + .kern: style.kern + ] + + if let textColor = textColor { + attributes[.foregroundColor] = textColor + } + + attributedText = NSAttributedString(string: targetText, attributes: attributes) + typingAttributes = attributes + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/HomeStateView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/HomeStateView.swift index d8b8df9a..f53be5f9 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/HomeStateView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/HomeStateView.swift @@ -25,21 +25,23 @@ final class HomeStateView: BaseView { } override func setStyle() { - backgroundColor = .white10 + backgroundColor = .white5 layer.cornerRadius = 12 layer.borderWidth = 1 layer.borderColor = state.borderColor.cgColor - titleLabel.do { - $0.text = state.title - $0.font = FontManager.sub2Sb18.font - $0.textColor = .grayscale50 - } - descriptionLabel.do { - $0.text = state.description - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale300 - } + titleLabel.applyByeBooFont( + style: .sub2Sb18, + text: state.title, + color: .grayscale50 + ) + + descriptionLabel.applyByeBooFont( + style: .body6R14, + text: state.description, + color: .grayscale300 + ) + arrowImageView.do { $0.image = .right.withRenderingMode(.alwaysTemplate) $0.tintColor = .grayscale50 @@ -75,11 +77,23 @@ extension HomeStateView { func updateState(_ state: HomeState, _ journeyTitle: String? = nil) { layer.borderColor = state.borderColor.cgColor if let titleText = journeyTitle { - titleLabel.text = titleText + " " + state.title + titleLabel.applyByeBooFont( + style: .sub2Sb18, + text: titleText + " " + state.title, + color: .grayscale50 + ) } else { - titleLabel.text = state.title + titleLabel.applyByeBooFont( + style: .sub2Sb18, + text: state.title, + color: .grayscale50 + ) } - descriptionLabel.text = state.description + descriptionLabel.applyByeBooFont( + style: .body6R14, + text: state.description, + color: .grayscale300 + ) } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/JourneyProgressView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/JourneyProgressView.swift index fca7ef21..47531f71 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/JourneyProgressView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Home/JourneyProgressView.swift @@ -18,30 +18,30 @@ final class JourneyProgressView: BaseView { private var journeyTitle: String = "" override func setStyle() { - backgroundColor = .white10 + backgroundColor = .white5 layer.cornerRadius = 12 - titleLabel.do { - $0.text = "\(name)님의 \(journeyTitle) 여정" - $0.font = FontManager.sub2Sb18.font - $0.textColor = .grayscale50 - } + titleLabel.applyByeBooFont( + style: .sub2Sb18, + text: "\(name)님의 \(journeyTitle) 여정", + color: .grayscale50 + ) + progressStackView.do { $0.axis = .horizontal $0.spacing = 8 $0.alignment = .center } + progressView.do { $0.progress = 0 $0.progressTintColor = .primary300 $0.trackTintColor = .primary30020 $0.layer.cornerRadius = 12 } - progressLabel.do { - $0.font = FontManager.cap2R12.font - $0.textColor = .grayscale400 - } + + progressLabel.applyByeBooFont(style: .cap2R12, color: .grayscale400) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/CardJourneyView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/CardJourneyView.swift index 3bc11aa5..28d42489 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/CardJourneyView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/CardJourneyView.swift @@ -25,35 +25,44 @@ final class CardJourneyView: BaseView { backgroundImageView.do { $0.image = .bgDark } + backgroundView.do { $0.backgroundColor = .black50 } - tipDescriptionLabel.do { - $0.text = "카드를 뒤집어서 내용을 확인해 주세요!" - $0.font = FontManager.body3R16.font - $0.textColor = .white50 - } + tipDescriptionLabel.applyByeBooFont( + style: .body3R16, + text: "카드를 뒤집어서 내용을 확인해 주세요!", + color: .white50 + ) + cardImageView.do { $0.isUserInteractionEnabled = true } + descriptionImageView.do { $0.isUserInteractionEnabled = true $0.isHidden = true } + descriptionLabel.do { - $0.numberOfLines = 0 - $0.font = FontManager.body6R14.font - $0.textColor = .secondary50 - $0.textAlignment = .center + $0.applyByeBooFont( + style: .body6R14, + color: .secondary50, + textAlignment: .center, + numberOfLines: 0 + ) $0.isHidden = true } + confirmLabel.do { - $0.text = "확인했어요" + $0.applyByeBooFont( + style: .body4Sb14, + text: "확인했어요", + color: .secondary300, + textAlignment: .center + ) $0.underLine(text: $0.text ?? "") - $0.font = FontManager.body4Sb14.font - $0.textColor = .secondary300 - $0.textAlignment = .center $0.isHidden = true } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/HomeOnboardingView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/HomeOnboardingView.swift index e478be9b..2f81d919 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/HomeOnboardingView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/HomeOnboardingView.swift @@ -26,10 +26,12 @@ final class HomeOnboardingView: BaseView { $0.backgroundColor = .black80 } descriptionLabel.do { - $0.text = "보리를 꾹 눌러주세요!" - $0.font = FontManager.body3R16.font - $0.textColor = .white50 - $0.textAlignment = .center + $0.applyByeBooFont( + style: .body3R16, + text: "보리를 꾹 눌러주세요!", + color: .white50, + textAlignment: .center + ) $0.alpha = 0 } characterLottie.do { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/JourneyResultView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/JourneyResultView.swift index 5c400ab3..3224f5eb 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/JourneyResultView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/JourneyResultView.swift @@ -23,22 +23,23 @@ final class JourneyResultView: BaseView { backgroundView.do { $0.backgroundColor = .black50 } - titleLabel.do { - $0.font = FontManager.body1Sb16.font - $0.textColor = .white - } - descriptionLabel.do { - $0.numberOfLines = 0 - $0.font = FontManager.body6R14.font - $0.textColor = .secondary100 - $0.textAlignment = .center - } + titleLabel.applyByeBooFont(style: .body1Sb16, color: .white) + + descriptionLabel.applyByeBooFont( + style: .body6R14, + color: .secondary100, + textAlignment: .center, + numberOfLines: 0 + ) + confirmLabel.do { - $0.text = "확인했어요" + $0.applyByeBooFont( + style: .body4Sb14, + text: "확인했어요", + color: .secondary300, + textAlignment: .center + ) $0.underLine(text: $0.text ?? "") - $0.font = FontManager.body4Sb14.font - $0.textColor = .secondary300 - $0.textAlignment = .center } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingContentView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingContentView.swift index 27374af7..27654e5d 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingContentView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingContentView.swift @@ -41,48 +41,58 @@ final class OnboardingContentView: BaseView { firstTopImageView.do { $0.image = .first } - firstTopDescriptionLabel.do { - $0.text = "저는 당신이 털어놓은 감정을 담는 보따리,\n보리라고 해요." - $0.textAlignment = .center - $0.numberOfLines = 0 - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale900 - } + + firstTopDescriptionLabel.applyByeBooFont ( + style: .body3R16, + text: "저는 당신이 털어놓은 감정을 담는 보따리,\n보리라고 해요.", + color: .grayscale900, + textAlignment: .center, + numberOfLines: 0 + ) + firstBottomImageView.do { $0.image = .second } - firstBottomDescriptionLable.do { - $0.text = "이별 후 걸림돌 같은 감정들을 털어놔 주시면\n제 안에서 감정돌이 되어 쌓여요." - $0.textAlignment = .center - $0.numberOfLines = 0 - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale900 - } + + firstBottomDescriptionLable.applyByeBooFont ( + style: .body3R16, + text: "이별 후 걸림돌 같은 감정들을 털어놔 주시면\n제 안에서 감정돌이 되어 쌓여요.", + color: .grayscale900, + textAlignment: .center, + numberOfLines: 0 + ) + secondTopImageView.do { $0.image = .third } - secondTopDescriptionLabel.do { - $0.text = "당신이 준비가 되었을 때\n감정돌들을 하나씩 꺼내 바닥에 놓아드려요." - $0.textAlignment = .center - $0.numberOfLines = 0 - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale900 - } + + secondTopDescriptionLabel.applyByeBooFont ( + style: .body3R16, + text: "당신이 준비가 되었을 때\n감정돌들을 하나씩 꺼내 바닥에 놓아드려요.", + color: .grayscale900, + textAlignment: .center, + numberOfLines: 0 + ) + secondBottomImageView.do { $0.image = .fourth } - secondBottomDescriptionLabel.do { - $0.text = "제가 모아둔 감정돌을 디딤돌 삼아\n한 걸음 한 걸음 미래로 나아가주세요." - $0.textAlignment = .center - $0.numberOfLines = 0 - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale900 - } + + secondBottomDescriptionLabel.applyByeBooFont ( + style: .body3R16, + text: "제가 모아둔 감정돌을 디딤돌 삼아\n한 걸음 한 걸음 미래로 나아가주세요.", + color: .grayscale900, + textAlignment: .center, + numberOfLines: 0 + ) + thirdImageView.do { $0.image = .fifth } - thirdDescriptionLabel.do { - $0.text = """ + + thirdDescriptionLabel.applyByeBooFont ( + style: .body3R16, + text: """ 자, 이제 시간이 됐어요. 당신에게 꼭 맞는 이별 극복 여정에 따라 @@ -90,12 +100,11 @@ final class OnboardingContentView: BaseView { 감정을 정리하고, 극복해 보아요. 저 보리가 항상 함께할게요. - """ - $0.textAlignment = .center - $0.numberOfLines = 0 - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale900 - } + """, + color: .grayscale900, + textAlignment: .center, + numberOfLines: 0 + ) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingHeaderView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingHeaderView.swift index 7210ec76..e25e22d3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingHeaderView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Home/View/Onboarding/OnboardingHeaderView.swift @@ -21,22 +21,26 @@ final class OnboardingHeaderView: BaseView { } override func setStyle() { - stepLabel.do { - $0.text = "\(step.rawValue)/3" - $0.font = FontManager.body6R14.font - $0.textColor = .primary300 - } + stepLabel.applyByeBooFont( + style: .body6R14, + text: "\(step.rawValue)/3", + color: .primary300 + ) + skipStackView.do { $0.axis = .horizontal $0.spacing = 4 $0.alignment = .center $0.isHidden = step.rawValue == 3 ? true : false } + skipLabel.do { - $0.text = "SKIP" + $0.applyByeBooFont( + style: .body6R14, + text: "SKIP", + color: .primary300 + ) $0.underLine(text: $0.text ?? "") - $0.font = FontManager.body6R14.font - $0.textColor = .primary300 } arrowImageView.do { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/EmotionCardView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/EmotionCardView.swift index 87656a7d..92e3f4b3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/EmotionCardView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/EmotionCardView.swift @@ -34,19 +34,22 @@ final class EmotionCardView: BaseView { override func setStyle() { backgroundView.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.layer.cornerRadius = 12 setBlurEffect(alpha: 0.5) } + cardImageView.do { $0.contentMode = .scaleAspectFit $0.backgroundColor = .clear } - stateLabel.do { - $0.textColor = .grayscale300 - $0.textAlignment = .center - $0.font = FontManager.body6R14.font - } + + stateLabel.applyByeBooFont ( + style: .body6R14, + color: .grayscale300, + textAlignment: .center + ) + setBlurEffect() } @@ -87,7 +90,7 @@ final class EmotionCardView: BaseView { } else { stateLabel.textColor = .grayscale300 backgroundView.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.layer.borderWidth = 0 } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/SelectEmotionView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/SelectEmotionView.swift index d7fb5111..feb7d70a 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/SelectEmotionView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Feeling/SelectEmotionView.swift @@ -29,19 +29,19 @@ final class SelectEmotionView: BaseView { override func setStyle() { titleView.backgroundColor = .clear - titleLabel.do { - $0.text = "감정 상태를 알려주세요" - $0.textColor = .grayscale50 - $0.textAlignment = .left - $0.font = FontManager.head1M24.font - } + titleLabel.applyByeBooFont ( + style: .head1M24, + text:"감정 상태를 알려주세요", + color: .grayscale50, + textAlignment: .left + ) - subTitleLabel.do { - $0.text = "이별 후, 어떤 감정으로 하루를 보내고 계신가요?" - $0.textColor = .grayscale400 - $0.textAlignment = .left - $0.font = FontManager.body6R14.font - } + subTitleLabel.applyByeBooFont ( + style: .body6R14, + text: "이별 후, 어떤 감정으로 하루를 보내고 계신가요?", + color: .grayscale400, + textAlignment: .left + ) emotionCardsView.backgroundColor = .clear } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Loading/LoadingView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Loading/LoadingView.swift index 1a3f6a10..899e751c 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Loading/LoadingView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Loading/LoadingView.swift @@ -33,22 +33,27 @@ final class LoadingView: BaseView { $0.axis = .vertical $0.spacing = 35 } + loadingView.do { $0.play() $0.loopMode = .loop $0.contentMode = .scaleAspectFill $0.transform = CGAffineTransform(scaleX: 2.3.adjustedW, y: 2.3.adjustedH) } + titleLabel.do { - $0.font = FontManager.body3R16.font + $0.applyByeBooFont( + style: .body3R16, + color: .grayscale50, + textAlignment: .center, + numberOfLines: 2 + ) $0.attributedText = "\(nickname)님에게 꼭 맞는\n이별 극복 여정을 찾는 중 ..." .makeTitle( rangedText: nickname, font: FontManager.body1Sb16.font, baseFont: FontManager.body3R16.font ) - $0.numberOfLines = 2 - $0.textAlignment = .center } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Nickname/InputNicknameView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Nickname/InputNicknameView.swift index a262e381..6dbb8ec5 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Nickname/InputNicknameView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Nickname/InputNicknameView.swift @@ -39,18 +39,21 @@ final class InputNicknameView: BaseView { override func setStyle() { titleView.backgroundColor = .clear - titleLabel.do { - $0.text = "닉네임을 입력해주세요" - $0.textColor = .grayscale50 - $0.textAlignment = .left - $0.font = FontManager.head1M24.font - } - subTitleLabel.do { - $0.text = "어떤 이름으로 불러드릴까요?" - $0.textColor = .grayscale400 - $0.textAlignment = .left - $0.font = FontManager.body6R14.font - } + + titleLabel.applyByeBooFont( + style: .head1M24, + text: "닉네임을 입력해주세요", + color: .grayscale50, + textAlignment: .left + ) + + subTitleLabel.applyByeBooFont ( + style: .body6R14, + text: "어떤 이름으로 불러드릴까요?", + color: .grayscale400, + textAlignment: .left + ) + nicknameFieldView.backgroundColor = .clear } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardView.swift index 84ba937d..c3703ad4 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardView.swift @@ -36,24 +36,27 @@ final class QuestCardView: BaseView { override func setStyle() { backgroundView.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.layer.cornerRadius = 12 setBlurEffect(alpha: 0.5) } + cardImageView.do { $0.backgroundColor = .clear } - titleLabel.do { - $0.textColor = .grayscale300 - $0.textAlignment = .center - $0.font = FontManager.sub3M18.font - } - subTitleLabel.do { - $0.textColor = .grayscale300 - $0.textAlignment = .center - $0.font = FontManager.body6R14.font - $0.numberOfLines = 3 - } + + titleLabel.applyByeBooFont ( + style: .sub3M18, + color: .grayscale300, + textAlignment: .center + ) + + subTitleLabel.applyByeBooFont ( + style: .body6R14, + color: .grayscale300, + textAlignment: .center, + numberOfLines: 0 + ) } override func setUI() { @@ -93,30 +96,18 @@ final class QuestCardView: BaseView { onSelected?() if isSelected { - titleLabel.do { - $0.textColor = .primary200 - $0.font = FontManager.sub2Sb18.font - } - subTitleLabel.do { - $0.textColor = .primary200 - $0.font = FontManager.body5M14.font - } + titleLabel.applyByeBooFont(style: .sub2Sb18, color: .primary200) + subTitleLabel.applyByeBooFont(style: .body5M14, color: .primary200) backgroundView.do { $0.backgroundColor = .primary30020 $0.layer.borderWidth = 2 $0.layer.borderColor = UIColor.primary300.cgColor } } else { - titleLabel.do { - $0.textColor = .grayscale300 - $0.font = FontManager.sub3M18.font - } - subTitleLabel.do { - $0.textColor = .grayscale300 - $0.font = FontManager.body6R14.font - } + titleLabel.applyByeBooFont(style: .sub3M18, color: .grayscale300) + subTitleLabel.applyByeBooFont(style: .body6R14, color: .grayscale300) backgroundView.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.layer.borderWidth = 0 } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardsView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardsView.swift index 10f805f4..d2c6d604 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardsView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/QuestCardsView.swift @@ -15,12 +15,12 @@ final class QuestCardsView: BaseView { private(set) var questCards = [ QuestCardView( title: "질문에 답하기", - subTitle: "질문을 통해\n상황과 감정을\n정리해요", + subTitle: "질문을 통해 상황과 감정을 정리해요", image: .book ), QuestCardView( title: "활동 인증하기", - subTitle: "작은 미션을 통해\n몸과 마음을\n가볍게 해요", + subTitle: "작은 미션을 통해 몸과 마음을 가볍게 해요", image: .shoe ) ] diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/SelectQuestView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/SelectQuestView.swift index 2d055bfa..c3ec9133 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/SelectQuestView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Information/View/Quest/SelectQuestView.swift @@ -29,19 +29,19 @@ final class SelectQuestView: BaseView { override func setStyle() { titleView.backgroundColor = .clear - titleLabel.do { - $0.text = "퀘스트 방식을 골라주세요" - $0.textColor = .grayscale50 - $0.textAlignment = .left - $0.font = FontManager.head1M24.font - } + titleLabel.applyByeBooFont ( + style: .head1M24, + text: "퀘스트 방식을 골라주세요", + color: .grayscale50, + textAlignment: .left + ) - subTitleLabel.do { - $0.text = "나에게 맞는 방식으로 퀘스트를 받아볼 수 있어요." - $0.textColor = .grayscale400 - $0.textAlignment = .left - $0.font = FontManager.body6R14.font - } + subTitleLabel.applyByeBooFont ( + style: .body6R14, + text: "나에게 맞는 방식으로 퀘스트를 받아볼 수 있어요.", + color: .grayscale400, + textAlignment: .left + ) questCardsView.backgroundColor = .clear } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift index 7e145e2d..2f319175 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewController/LoginViewController.swift @@ -43,12 +43,14 @@ final class LoginViewController: BaseViewController { extension LoginViewController{ @objc private func kakaoLoginButtonDidTap() { + rootView.kakaoLoginButton.isUserInteractionEnabled = false self.platform = .KAKAO viewModel.action(.socialLoginButtonDidTap(platform: .KAKAO)) } @objc private func appleLoginButtonDidTap() { + rootView.appleLoginButton.isUserInteractionEnabled = false self.platform = .APPLE viewModel.action(.socialLoginButtonDidTap(platform: .APPLE)) } @@ -57,12 +59,15 @@ extension LoginViewController{ extension LoginViewController { private func bind() { viewModel.output.isRegisteredPublisher - .throttle(for: .seconds(1.0), scheduler: DispatchQueue.main, latest: false) .receive(on: DispatchQueue.main) .sink { result in + self.rootView.appleLoginButton.isUserInteractionEnabled = true + self.rootView.kakaoLoginButton.isUserInteractionEnabled = true + switch result { case .success(let isRegisterd): - ByeBooLogger.debug(isRegisterd) + ByeBooLogger.debug("온보딩 완료 여부 \(isRegisterd)") + let nextViewController: UIViewController if isRegisterd { nextViewController = ByeBooTabBar() diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift index a14cef3d..bbfc1993 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Login/ViewModel/SplashViewModel.swift @@ -64,6 +64,7 @@ extension SplashViewModel { guard let error = error as? ByeBooError else { return } + autoLoginSubject.send(.failure((.noData))) ByeBooLogger.debug(ByeBooError.networkConnect) ByeBooLogger.error(error as ByeBooError) } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ByeBooUniverseView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ByeBooUniverseView.swift index 96533f0b..9e25f66d 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ByeBooUniverseView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ByeBooUniverseView.swift @@ -17,11 +17,12 @@ final class ByeBooUniverseView: BaseView { iconImageView.do { $0.image = .change } - titleLabel.do { - $0.text = "보리가 궁금하다면?" - $0.font = FontManager.body1Sb16.font - $0.textColor = .grayscale300 - } + + titleLabel.applyByeBooFont ( + style: .body1Sb16, + text: "보리가 궁금하다면?", + color: .grayscale300 + ) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift index 9bd583a7..2c6f9430 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift @@ -66,29 +66,27 @@ final class JourneyListView: BaseView { $0.axis = .horizontal $0.spacing = 8 } - titleLabel.do { - $0.font = FontManager.cap1M12.font - $0.textColor = .grayscale300 - } - countLabel.do { - $0.font = FontManager.body2M16.font - $0.textColor = .grayscale500 - } + + titleLabel.applyByeBooFont(style: .cap1M12, color: .grayscale300) + countLabel.applyByeBooFont(style: .body2M16, color: .grayscale500) + journeyListView?.do { $0.spacing = 16.adjustedH $0.axis = .vertical $0.isUserInteractionEnabled = true } - emptyLabel?.do { - $0.text = "아직 완료된 여정이 없어요!" - $0.font = FontManager.body3R16.font - $0.textColor = .grayscale300 - } - prepareTitleLabel.do { - $0.text = "준비 중" - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale600 - } + + emptyLabel?.applyByeBooFont ( + style: .body6R14, + text: "아직 완료된 여정이 없어요!", + color: .grayscale400 + ) + + prepareTitleLabel.applyByeBooFont ( + style: .body6R14, + text: "준비 중", + color: .grayscale600 + ) } override func setUI() { @@ -116,7 +114,7 @@ final class JourneyListView: BaseView { prepareView.addSubview(prepareTitleLabel) prepareView.snp.makeConstraints { - $0.height.equalTo(62.adjustedH) + $0.height.equalTo(65.adjustedH) } prepareTitleLabel.snp.makeConstraints { $0.center.equalToSuperview() @@ -130,13 +128,13 @@ final class JourneyListView: BaseView { override func setLayout() { stackView.snp.makeConstraints { - $0.top.equalToSuperview().inset(16.adjustedH) + $0.top.equalToSuperview() $0.leading.equalToSuperview().inset(24.adjustedW) } if let emptyLabel { emptyLabel.snp.makeConstraints { - $0.top.equalTo(stackView.snp.bottom).offset(201.adjustedH) + $0.top.equalTo(stackView.snp.bottom).offset(176.5.adjustedH) $0.centerX.equalToSuperview() } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/LookBackJourneyView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/LookBackJourneyView.swift index a030eb88..a85261ca 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/LookBackJourneyView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/LookBackJourneyView.swift @@ -28,11 +28,11 @@ final class LookBackJourneyView: BaseView { override func setStyle() { backgroundColor = .grayscale900 - titleLabel.do { - $0.text = "내가 완료한 여정이에요" - $0.font = FontManager.head1M24.font - $0.textColor = .grayscale50 - } + titleLabel.applyByeBooFont ( + style: .head1M24, + text: "내가 완료한 여정이에요", + color: .grayscale50 + ) } override func setUI() { @@ -46,15 +46,15 @@ final class LookBackJourneyView: BaseView { override func setLayout() { let safeArea = safeAreaLayoutGuide titleLabel.snp.makeConstraints { - $0.top.equalTo(safeArea).inset(4.5.adjustedH) + $0.top.equalTo(safeArea).inset(10.adjustedH) $0.horizontalEdges.equalToSuperview().inset(24.adjustedW) } divider.snp.makeConstraints { - $0.top.equalTo(titleLabel.snp.bottom).offset(12.5.adjustedH) + $0.top.equalTo(titleLabel.snp.bottom).offset(10.adjustedH) $0.horizontalEdges.equalToSuperview().inset(24.adjustedW) } journeyView.snp.makeConstraints { - $0.top.equalTo(divider.snp.bottom).offset(8.adjustedH) + $0.top.equalTo(divider.snp.bottom).offset(20.adjustedH) $0.horizontalEdges.equalToSuperview() } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ModifyNicknameView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ModifyNicknameView.swift index a91fabad..3e99bbf7 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ModifyNicknameView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/ModifyNicknameView.swift @@ -12,7 +12,7 @@ final class ModifyNicknameView: BaseView { private let nicknameLabel = UILabel() private(set) var nicknameTextField = ByeBooNicknameTextField(.onBeginEditing) private(set) var nicknameStateView = NicknameStateView() - private(set) var confirmButton = ByeBooButton(titleText: "완료", type: .disabled) + private(set) var confirmButton = ByeBooButton(titleText: "완료하기", type: .disabled) init() { super.init(frame: .zero) @@ -28,18 +28,21 @@ final class ModifyNicknameView: BaseView { } override func setStyle() { - nicknameLabel.do { - $0.text = "닉네임" - $0.textColor = .grayscale300 - $0.font = FontManager.body1Sb16.font - } + nicknameLabel.applyByeBooFont ( + style: .body1Sb16, + text: "닉네임", + color: .grayscale300 + ) + nicknameTextField.do { $0.nicknameField.placeholder = "" - $0.nicknameField.backgroundColor = .white10 + $0.nicknameField.backgroundColor = .white5 } + nicknameStateView.do { $0.isHidden = true } + confirmButton.do { $0.isHidden = true } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyPageFeatureView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyPageFeatureView.swift index edde1020..f1128399 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyPageFeatureView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyPageFeatureView.swift @@ -26,15 +26,17 @@ final class MyPageFeatureView: BaseView { } override func setStyle() { - titleLabel.do { - $0.font = FontManager.body1Sb16.font - $0.textColor = .grayscale400 - $0.textAlignment = .left - } + titleLabel.applyByeBooFont ( + style: .body1Sb16, + color: .grayscale400, + textAlignment: .left + ) + featureStackView.do { $0.axis = .vertical $0.spacing = 14 } + noticeSwitch.do { $0.onTintColor = .primary300 $0.tintColor = .grayscale600 @@ -80,9 +82,11 @@ final class MyPageFeatureView: BaseView { private func createFeatureButton(feature: String) -> UIButton { let featureButton = UIButton() featureButton.do { - $0.setTitle(feature, for: .normal) - $0.titleLabel?.font = FontManager.body3R16.font - $0.setTitleColor(.grayscale50, for: .normal) + $0.applyByeBooFont( + style: .body3R16, + text: feature, + color: .grayscale50 + ) $0.backgroundColor = .clear } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyRecordView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyRecordView.swift index c150aff2..2dafcf6a 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyRecordView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/MyRecordView.swift @@ -18,11 +18,11 @@ final class MyRecordView: BaseView { $0.image = .write } - titleLabel.do { - $0.text = "나의 기록" - $0.font = FontManager.body1Sb16.font - $0.textColor = .grayscale300 - } + titleLabel.applyByeBooFont ( + style: .body1Sb16, + text: "나의 기록", + color: .grayscale300 + ) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/NewJourneySelectView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/NewJourneySelectView.swift index 139c2cb0..b35faa0f 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/NewJourneySelectView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/NewJourneySelectView.swift @@ -31,16 +31,18 @@ final class NewJourneySelectView: BaseView { override func setStyle() { backgroundColor = .grayscale900 - titleLabel.do { - $0.text = "어떤 여정을 시작해 볼까요?" - $0.font = FontManager.head1M24.font - $0.textColor = .grayscale50 - } - descriptionLabel.do { - $0.text = "각 여정 당 30개의 퀘스트를 제공해 드려요" - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale400 - } + titleLabel.applyByeBooFont ( + style: .head1M24, + text: "어떤 여정을 시작해 볼까요?", + color: .grayscale50 + ) + + descriptionLabel.applyByeBooFont ( + style: .body6R14, + text: "각 여정 당 30개의 퀘스트를 제공해 드려요", + color: .grayscale400 + ) + unCompleteListView.do { $0.isUserInteractionEnabled = true } @@ -59,19 +61,19 @@ final class NewJourneySelectView: BaseView { let safeArea = safeAreaLayoutGuide titleLabel.snp.makeConstraints { - $0.top.equalTo(safeArea).offset(3.5.adjustedH) + $0.top.equalTo(safeArea).offset(10.adjustedH) $0.leading.equalToSuperview().inset(24.adjustedW) } descriptionLabel.snp.makeConstraints { - $0.top.equalTo(titleLabel.snp.bottom).offset(8.adjustedH) + $0.top.equalTo(titleLabel.snp.bottom).offset(12.adjustedH) $0.leading.equalToSuperview().inset(24.adjustedH) } divider1.snp.makeConstraints { - $0.top.equalTo(descriptionLabel.snp.bottom).offset(11.5.adjustedH) + $0.top.equalTo(descriptionLabel.snp.bottom).offset(10.adjustedH) $0.horizontalEdges.equalToSuperview().inset(24.adjustedW) } unCompleteListView.snp.makeConstraints { - $0.top.equalTo(divider1.snp.bottom).offset(8.adjustedH) + $0.top.equalTo(divider1.snp.bottom).offset(20.adjustedH) $0.horizontalEdges.equalToSuperview() } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Offboarding/View/FinishJourneyView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Offboarding/View/FinishJourneyView.swift index 8b0f9a06..d992fd43 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Offboarding/View/FinishJourneyView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Offboarding/View/FinishJourneyView.swift @@ -36,12 +36,12 @@ final class FinishJourneyView: BaseView { backgroundView.do { $0.backgroundColor = .black80 } - titleLabel.do { - $0.text = "🎉 감정 직면 여정을 완료했어요! 🎉" - $0.font = FontManager.sub2Sb18.font - $0.textColor = .secondary300 - $0.textAlignment = .center - } + titleLabel.applyByeBooFont ( + style: .sub2Sb18, + text: "🎉 감정 직면 여정을 완료했어요! 🎉", + color: .secondary300, + textAlignment: .center + ) characterLottie.do { $0.play() $0.loopMode = .loop @@ -53,28 +53,31 @@ final class FinishJourneyView: BaseView { $0.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 4.adjustedW) $0.titleEdgeInsets = UIEdgeInsets(top: 0, left: 4.adjustedW, bottom: 0, right: 0) } - firstTextLabel.do { - $0.text = animationText[0] - $0.numberOfLines = 0 - $0.font = FontManager.body5M14.font - $0.textColor = .secondary50 - $0.textAlignment = .center - } - secondTextLabel.do { - $0.text = animationText[1] - $0.numberOfLines = 0 - $0.font = FontManager.cap1M12.font - $0.textColor = .secondary5050 - $0.textAlignment = .center - } + firstTextLabel.applyByeBooFont ( + style: .body5M14, + text: animationText[0], + color: .secondary50, + textAlignment: .center, + numberOfLines: 0 + ) + + secondTextLabel.applyByeBooFont ( + style: .cap1M12, + text: animationText[1], + color: .secondary5050, + textAlignment: .center, + numberOfLines: 0 + ) thirdTextLabel.do { - $0.text = animationText[2] - $0.numberOfLines = 0 - $0.font = FontManager.cap1M12.font - $0.textColor = .secondary5050 - $0.textAlignment = .center + $0.applyByeBooFont ( + style: .cap1M12, + text: animationText[2], + color: .secondary5050, + textAlignment: .center, + numberOfLines: 0 + ) $0.alpha = 0 } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/DetailTermsView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/DetailTermsView.swift index 1e062216..09e73289 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/DetailTermsView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/DetailTermsView.swift @@ -34,14 +34,13 @@ final class DetailTermsView: BaseView { $0.setImage(.checkOff.withTintColor(.grayscale400), for: .normal) $0.backgroundColor = .clear } - contentLabel.do { - $0.textColor = .grayscale400 - $0.font = FontManager.cap2R12.font - } + contentLabel.applyByeBooFont(style: .cap2R12, color: .grayscale400) viewMoreButton.do { - $0.setTitle("더보기", for: .normal) - $0.setTitleColor(.grayscale400, for: .normal) - $0.titleLabel?.font = FontManager.cap2R12.font + $0.applyByeBooFont( + style: .cap2R12, + text: "더보기", + color: .grayscale400 + ) $0.setUnderLine() } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/TermsView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/TermsView.swift index 5c14bb7d..fc240efa 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/TermsView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Onboarding/View/TermsView.swift @@ -26,18 +26,18 @@ final class TermsView: BaseView { backgroundImageView.do { $0.image = .bgDark } - mainTitleLabel.do { - $0.text = "필수 약관에 동의해 주세요" - $0.textColor = .grayscale50 - $0.font = FontManager.head1M24.font - } - subTitleLabel.do { - $0.text = "Bye Boo 이용을 위해 필요해요" - $0.textColor = .grayscale400 - $0.font = FontManager.body6R14.font - } + mainTitleLabel.applyByeBooFont ( + style: .head1M24, + text: "필수 약관에 동의해 주세요", + color: .grayscale50 + ) + subTitleLabel.applyByeBooFont ( + style: .body6R14, + text: "Bye Boo 이용을 위해 필요해요", + color: .grayscale400 + ) allAgreeView.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.layer.cornerRadius = 12 } allCheckButton.do { @@ -45,11 +45,11 @@ final class TermsView: BaseView { $0.clipsToBounds = true $0.layer.cornerRadius = 9 } - allAgreeLabel.do { - $0.text = "전체 동의" - $0.textColor = .grayscale300 - $0.font = FontManager.body3R16.font - } + allAgreeLabel.applyByeBooFont ( + style: .body3R16, + text: "전체 동의", + color: .grayscale300 + ) } override func setUI() { @@ -133,7 +133,7 @@ extension TermsView { private func updateUI() { allAgreeView.do { - $0.backgroundColor = isAllAgreeButtonDidTap ? .primary30020 : .white10 + $0.backgroundColor = isAllAgreeButtonDidTap ? .primary30020 : .white5 $0.layer.borderWidth = isAllAgreeButtonDidTap ? 1 : 0 $0.layer.borderColor = UIColor.primary300.cgColor } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/Common/QuestHeaderBaseView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/Common/QuestHeaderBaseView.swift index 357ca4e0..6345564c 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/Common/QuestHeaderBaseView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/Common/QuestHeaderBaseView.swift @@ -22,18 +22,18 @@ class QuestHeaderBaseView: BaseView { override func setStyle() { backgroundColor = .grayscale900 - titleLabel.do { - $0.font = FontManager.head1M24.font - $0.numberOfLines = 0 - $0.textAlignment = .left - $0.textColor = .grayscale50 - } - subTitleLabel.do { - $0.text = subtitleText - $0.textColor = .grayscale400 - $0.textAlignment = .left - $0.font = FontManager.body6R14.font - } + titleLabel.applyByeBooFont ( + style: .head1M24, + color: .grayscale50, + textAlignment: .left, + numberOfLines: 0 + ) + subTitleLabel.applyByeBooFont ( + style: .body6R14, + text: subtitleText, + color: .grayscale400, + textAlignment: .left + ) } override func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Archive/ArchiveQuestHeaderView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Archive/ArchiveQuestHeaderView.swift index a496fede..610d5a01 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Archive/ArchiveQuestHeaderView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Archive/ArchiveQuestHeaderView.swift @@ -60,28 +60,17 @@ final class ArchiveQuestHeaderView: BaseView { $0.distribution = .equalCentering } - questNumberLabel.do { - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale500 - } - - dateLabel.do { - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale500 - } + questNumberLabel.applyByeBooFont(style: .body6R14, color: .grayscale500) + dateLabel.applyByeBooFont(style: .body6R14, color: .grayscale500) questTitleLabel.do { - $0.font = FontManager.head1M24.font - $0.textColor = .grayscale100 - $0.numberOfLines = 0 + $0.applyByeBooFont ( + style: .head1M24, + color: .grayscale100, + textAlignment: type == .complete ? .center : .left, + numberOfLines: 0 + ) $0.lineBreakMode = .byWordWrapping - - switch type { - case .complete: - $0.textAlignment = .center - case .archive: - $0.textAlignment = .left - } } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QuestStateCell.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QuestStateCell.swift index 6ecbfd84..060e15f3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QuestStateCell.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QuestStateCell.swift @@ -33,14 +33,14 @@ final class QuestStateCell: UICollectionViewCell { private func setStyle() { questBackgroundView.layer.cornerRadius = 12 frontView.backgroundColor = .clear - questNumberLabel.font = FontManager.cap1M12.font + questNumberLabel.applyByeBooFont(style: .cap1M12, color: .white50) imageContentView.backgroundColor = .clear imageView.backgroundColor = .clear - timerLabel.do { - $0.textColor = .secondary300 - $0.font = FontManager.cap1M12.font - $0.textAlignment = .center - } + timerLabel.applyByeBooFont ( + style: .cap1M12, + color: .secondary300, + textAlignment: .center + ) } private func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QusetStepHeaderView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QusetStepHeaderView.swift index 5722a07e..2c6e16f4 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QusetStepHeaderView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestMain/QusetStepHeaderView.swift @@ -28,14 +28,8 @@ final class QuestStepHeaderView: UICollectionReusableView { } private func setStyle() { - stepLabel.do { - $0.textColor = .secondary300 - $0.font = FontManager.cap1M12.font - } - titleLabel.do { - $0.textColor = .grayscale50 - $0.font = FontManager.body2M16.font - } + stepLabel.applyByeBooFont(style: .cap1M12, color: .secondary300) + titleLabel.applyByeBooFont(style: .body2M16, color: .grayscale50) } private func setUI() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestSelectCard.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestSelectCard.swift index 60762156..cd855f46 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestSelectCard.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestSelectCard.swift @@ -27,17 +27,18 @@ final class QuestSelectCard: BaseView { } override func setStyle() { - backgroundColor = .white10 + backgroundColor = .white5 layer.cornerRadius = 12 layer.borderWidth = 1 layer.borderColor = UIColor(.grayscale700).cgColor - titleLabel.do { - $0.text = type.title - $0.numberOfLines = 2 - $0.font = FontManager.head1M24.font - $0.textColor = .grayscale50 - } + titleLabel.applyByeBooFont ( + style: .head1M24, + text: type.title, + color: .grayscale50, + numberOfLines: 2 + ) + characterImageView.do { $0.image = type.character $0.contentMode = .scaleAspectFit diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestStartView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestStartView.swift index 20c47c46..a8ad086a 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestStartView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/QuestStart/QuestStartView.swift @@ -32,19 +32,25 @@ final class QuestStartView: BaseView { rangedText: "QUEST JOURNEY", originalTitleColor: .primary100 ) - $0.textAlignment = .center - $0.font = FontManager.head1M24.font - $0.numberOfLines = 2 + $0.applyByeBooFont( + style: .head1M24, + color: .primary100, + textAlignment: .center, + numberOfLines: 2 + ) } cloverImageView.do { $0.image = .clover $0.contentMode = .scaleAspectFit } descriptionLabel.do { - $0.font = FontManager.body3R16.font + $0.applyByeBooFont( + style: .body3R16, + color: .grayscale300, + textAlignment: .center, + numberOfLines: 0 + ) $0.attributedText = nil - $0.textAlignment = .center - $0.numberOfLines = 0 } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Tip/QuestTipView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Tip/QuestTipView.swift index 8f29fa8b..23be3a8b 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Tip/QuestTipView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/Tip/QuestTipView.swift @@ -97,13 +97,13 @@ final class QuestTipView: BaseView { $0.backgroundColor = .grayscale900 } - titleLabel.do { - $0.text = "퀘스트 작성 TIP" - $0.textColor = .white - $0.font = FontManager.sub1Sb20.font - } + titleLabel.applyByeBooFont ( + style: .sub1Sb20, + text: "퀘스트 작성 TIP", + color: .white + ) - closeButton.do { + closeButton.do { let image = UIImage.xicon.withRenderingMode(.alwaysTemplate) $0.setImage(image, for: .normal) $0.tintColor = .white @@ -114,17 +114,16 @@ final class QuestTipView: BaseView { $0.spacing = 8 } - questLabel.do { - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale500 - } + questLabel.applyByeBooFont(style: .body6R14, color: .grayscale500) title.do { - $0.font = FontManager.head1M24.font - $0.textColor = .grayscale100 - $0.textAlignment = .center + $0.applyByeBooFont( + style: .head1M24, + color: .grayscale100, + textAlignment: .center, + numberOfLines: 0 + ) $0.lineBreakMode = .byWordWrapping - $0.numberOfLines = 0 } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/CongratSquare.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/CongratSquare.swift index 33565697..7750e77b 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/CongratSquare.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/CongratSquare.swift @@ -23,7 +23,7 @@ final class CongratSquare: BaseView { override func setStyle() { self.do { $0.layer.cornerRadius = 12 - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 } titleLabel.do { @@ -31,9 +31,12 @@ final class CongratSquare: BaseView { rangedText: "QUEST", originalTitleColor: .primary100 ) - $0.font = FontManager.head1M24.font - $0.numberOfLines = 2 - $0.textAlignment = .center + $0.applyByeBooFont( + style: .head1M24, + color: .primary100, + textAlignment: .center, + numberOfLines: 2 + ) } imageLottie.do { @@ -42,13 +45,13 @@ final class CongratSquare: BaseView { $0.contentMode = .scaleAspectFill } - descriptionLabel.do { - $0.font = FontManager.body3R16.font - $0.text = "기특해요!\n점점 극복해 나가고 있어요 :)" - $0.textColor = .grayscale300 - $0.numberOfLines = 2 - $0.textAlignment = .center - } + descriptionLabel.applyByeBooFont ( + style: .body3R16, + text: "기특해요!\n점점 극복해 나가고 있어요 :)", + color: .grayscale300, + textAlignment: .center, + numberOfLines: 2 + ) } override func setLayout() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/ImagePickerContainer.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/ImagePickerContainer.swift index c2d6fd17..3bc33ff2 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/ImagePickerContainer.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/ImagePickerContainer.swift @@ -44,7 +44,7 @@ final class ImagePickerContainer: BaseView { } addImageButton.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 } plusIcon.do { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/QuestTextField.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/QuestTextField.swift index 9256f430..ca1f19a0 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/QuestTextField.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/QuestTextField.swift @@ -36,23 +36,25 @@ final class QuestTextField: BaseView { override func setStyle() { self.do { - $0.backgroundColor = .white10 + $0.backgroundColor = .white5 $0.layer.cornerRadius = 12 } textView.do { + $0.applyByeBooFont( + style: .body3R16, + text: placeholder, + color: .grayscale300 + ) $0.backgroundColor = .clear - $0.textColor = .grayscale300 - $0.text = placeholder - $0.font = FontManager.body3R16.font $0.tintColor = .white } - textCount.do { - $0.text = "(\(count)/\(limitCount))" - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale300 - } + textCount.applyByeBooFont ( + style: .body6R14, + text: "(\(count)/\(limitCount))", + color: .grayscale300 + ) } override func setLayout() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/WriteQuestTitleView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/WriteQuestTitleView.swift index 6832fac3..b7bb5aa3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/WriteQuestTitleView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/Common/WriteQuestTitleView.swift @@ -19,7 +19,7 @@ final class WriteQuestTitleView: BaseView { private let questNumLabel = UILabel() private let titleLabel = UILabel() - let tipTag = ByeBooFilledTag(tagType: .word3Purple, text: "작성 TIP") + let tipTag = ByeBooTipTag() init(stepNum: String, stepTitle: String, questNum: Int, title: String) { @@ -45,21 +45,16 @@ final class WriteQuestTitleView: BaseView { $0.spacing = 8.adjustedW } - stepTitle.do { - $0.font = FontManager.body2M16.font - $0.textColor = .grayscale500 - } - - questNumLabel.do { - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale500 - } + stepTitle.applyByeBooFont(style: .body2M16, color: .grayscale500) + questNumLabel.applyByeBooFont(style: .body6R14, color: .grayscale500) titleLabel.do { - $0.font = FontManager.head1M24.font - $0.textColor = .white - $0.numberOfLines = 0 - $0.textAlignment = .center + $0.applyByeBooFont( + style: .head1M24, + color: .white, + textAlignment: .center, + numberOfLines: 0 + ) $0.lineBreakMode = .byWordWrapping } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/ActivationType/WriteActiveTypeQuestView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/ActivationType/WriteActiveTypeQuestView.swift index d7cf248c..575ddcbd 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/ActivationType/WriteActiveTypeQuestView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/ActivationType/WriteActiveTypeQuestView.swift @@ -70,17 +70,17 @@ final class WriteActiveTypeQuestView: BaseView { $0.isUserInteractionEnabled = true } - imgTitleLabel.do { - $0.text = "사진 첨부" - $0.font = FontManager.body2M16.font - $0.textColor = .grayscale50 - } + imgTitleLabel.applyByeBooFont( + style: .body2M16, + text: "사진 첨부", + color: .grayscale50 + ) - imgCountLabel.do { - $0.text = "(\(imgCount)/1)" - $0.font = FontManager.body6R14.font - $0.textColor = .grayscale400 - } + imgCountLabel.applyByeBooFont( + style: .body6R14, + text: "(\(imgCount)/1)", + color: .grayscale400 + ) textStackView.do { $0.axis = .horizontal @@ -88,11 +88,11 @@ final class WriteActiveTypeQuestView: BaseView { $0.alignment = .center } - thinkTitleLabel.do { - $0.text = "생각 적기" - $0.font = FontManager.body2M16.font - $0.textColor = .grayscale50 - } + thinkTitleLabel.applyByeBooFont( + style: .body2M16, + text: "생각 적기", + color: .grayscale50 + ) } override func setLayout() { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/QuestionType/WriteQuestionTypeQuestView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/QuestionType/WriteQuestionTypeQuestView.swift index ba62b380..2983226b 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/QuestionType/WriteQuestionTypeQuestView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/WriteQuest/View/QuestionType/WriteQuestionTypeQuestView.swift @@ -50,12 +50,12 @@ final class WriteQuestionTypeQuestView: BaseView { $0.contentMode = .scaleAspectFit } - descriptionLabel.do { - $0.text = "10글자 이상 작성해 주세요." - $0.font = FontManager.cap2R12.font - $0.textColor = .grayscale400 - $0.textAlignment = .center - } + descriptionLabel.applyByeBooFont( + style: .cap2R12, + text: "10글자 이상 작성해 주세요.", + color: .grayscale400, + textAlignment: .center + ) } override func touchesBegan(_ touches: Set, with event: UIEvent?) { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry.png new file mode 100644 index 00000000..982f580a Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry@2x.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry@2x.png new file mode 100644 index 00000000..dcdf29b0 Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry@2x.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry@3x.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry@3x.png new file mode 100644 index 00000000..d88639de Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Bori_Retry@3x.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Contents.json new file mode 100644 index 00000000..58351376 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Retry.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Bori_Retry.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Bori_Retry@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Bori_Retry@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing.png new file mode 100644 index 00000000..d8a8cc69 Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing@2x.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing@2x.png new file mode 100644 index 00000000..7c82665d Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing@2x.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing@3x.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing@3x.png new file mode 100644 index 00000000..252fa0cc Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Bori_Writing@3x.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Contents.json new file mode 100644 index 00000000..d34f24a3 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/Bori_Writing.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Bori_Writing.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Bori_Writing@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Bori_Writing@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/Contents.json new file mode 100644 index 00000000..c2223418 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iOS_Letter.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iOS_Letter@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iOS_Letter@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter.png new file mode 100644 index 00000000..754d8d0a Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter@2x.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter@2x.png new file mode 100644 index 00000000..ae46ce77 Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter@2x.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter@3x.png b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter@3x.png new file mode 100644 index 00000000..8ce2a255 Binary files /dev/null and b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Bori/bori_Letter.imageset/iOS_Letter@3x.png differ diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/grayscale/grayscale800.colorset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/grayscale/grayscale800.colorset/Contents.json index e6bb4800..20d2b1a9 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/grayscale/grayscale800.colorset/Contents.json +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/grayscale/grayscale800.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x26", - "green" : "0x26", - "red" : "0x26" + "blue" : "0x2C", + "green" : "0x2C", + "red" : "0x2C" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x26", - "green" : "0x26", - "red" : "0x26" + "blue" : "0x2C", + "green" : "0x2C", + "red" : "0x2C" } }, "idiom" : "universal" diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/opacity/white-10.colorset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/opacity/white-5.colorset/Contents.json similarity index 91% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/opacity/white-10.colorset/Contents.json rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/opacity/white-5.colorset/Contents.json index b610bfc0..28b78abd 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/opacity/white-10.colorset/Contents.json +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/Color/opacity/white-5.colorset/Contents.json @@ -4,7 +4,7 @@ "color" : { "color-space" : "srgb", "components" : { - "alpha" : "0.100", + "alpha" : "0.050", "blue" : "0xFF", "green" : "0xFF", "red" : "0xFF" @@ -22,7 +22,7 @@ "color" : { "color-space" : "srgb", "components" : { - "alpha" : "0.100", + "alpha" : "0.050", "blue" : "0xFF", "green" : "0xFF", "red" : "0xFF" diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Block.imageset/Block.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Block.imageset/Block.svg new file mode 100644 index 00000000..4da518da --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Block.imageset/Block.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Block.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Block.imageset/Contents.json new file mode 100644 index 00000000..478aebd6 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Block.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Block.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Report.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Report.imageset/Contents.json new file mode 100644 index 00000000..04857b57 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Report.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Report.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Report.imageset/Report.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Report.imageset/Report.svg new file mode 100644 index 00000000..3e2b2e01 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/Report.imageset/Report.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/relieved_badge.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/relieved_badge.imageset/Contents.json new file mode 100644 index 00000000..37a9f301 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/relieved_badge.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "relieved_badge.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/relieved_badge.imageset/relieved_badge.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/relieved_badge.imageset/relieved_badge.svg new file mode 100644 index 00000000..4d706f26 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/relieved_badge.imageset/relieved_badge.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/sadness_badge.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/sadness_badge.imageset/Contents.json new file mode 100644 index 00000000..adf73583 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/sadness_badge.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "sadness_badge.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/sadness_badge.imageset/sadness_badge.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/sadness_badge.imageset/sadness_badge.svg new file mode 100644 index 00000000..3c9547bb --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/sadness_badge.imageset/sadness_badge.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/selfunderstanding_badge.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/selfunderstanding_badge.imageset/Contents.json new file mode 100644 index 00000000..ff1ae594 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/selfunderstanding_badge.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "selfunderstanding_badge.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/selfunderstanding_badge.imageset/selfunderstanding_badge.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/selfunderstanding_badge.imageset/selfunderstanding_badge.svg new file mode 100644 index 00000000..f5279adc --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/selfunderstanding_badge.imageset/selfunderstanding_badge.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/soso_badge.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/soso_badge.imageset/Contents.json new file mode 100644 index 00000000..c29064ef --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/soso_badge.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "soso_baddge.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/soso_badge.imageset/soso_baddge.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/soso_badge.imageset/soso_baddge.svg new file mode 100644 index 00000000..2133d44d --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/badge/soso_badge.imageset/soso_baddge.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_all.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_all.imageset/Contents.json index d93836b4..40848a9e 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_all.imageset/Contents.json +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_all.imageset/Contents.json @@ -2,16 +2,7 @@ "images" : [ { "filename" : "check_all.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" + "idiom" : "universal" } ], "info" : { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_round.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_round.imageset/Contents.json index fe3022da..669e53b2 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_round.imageset/Contents.json +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/check_round.imageset/Contents.json @@ -2,16 +2,7 @@ "images" : [ { "filename" : "check_round.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" + "idiom" : "universal" } ], "info" : { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/error_toast.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/error_toast.imageset/Contents.json index f2e282ff..52ca28db 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/error_toast.imageset/Contents.json +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/error_toast.imageset/Contents.json @@ -2,16 +2,7 @@ "images" : [ { "filename" : "icon.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" + "idiom" : "universal" } ], "info" : { diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_off.imageset/Contents.json new file mode 100644 index 00000000..45ae1fe2 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_off.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "left_chevron_off.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_off.imageset/left_chevron_off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_off.imageset/left_chevron_off.svg new file mode 100644 index 00000000..90c0c2e0 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_off.imageset/left_chevron_off.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_on.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_on.imageset/Contents.json new file mode 100644 index 00000000..91f51700 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_on.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "left_chevron_on.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_on.imageset/left_chevron_on.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_on.imageset/left_chevron_on.svg new file mode 100644 index 00000000..cd76ce50 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/left_chevron_on.imageset/left_chevron_on.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_off.imageset/Contents.json new file mode 100644 index 00000000..1888971f --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_off.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "my_off.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_off.imageset/my_off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_off.imageset/my_off.svg new file mode 100644 index 00000000..7fae7ed4 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_off.imageset/my_off.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_on.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_on.imageset/Contents.json new file mode 100644 index 00000000..2c7a6b05 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_on.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "my_on.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_on.imageset/my_on.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_on.imageset/my_on.svg new file mode 100644 index 00000000..995f746c --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/my_on.imageset/my_on.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_off.imageset/Contents.json new file mode 100644 index 00000000..28af1085 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_off.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "right_chevron_off.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_off.imageset/right_chevron_off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_off.imageset/right_chevron_off.svg new file mode 100644 index 00000000..d2d44bec --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_off.imageset/right_chevron_off.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_on.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_on.imageset/Contents.json new file mode 100644 index 00000000..d098daa4 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_on.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "right_chevron_on.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_on.imageset/right_chevron_on.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_on.imageset/right_chevron_on.svg new file mode 100644 index 00000000..d33bd381 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/right_chevron_on.imageset/right_chevron_on.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_off.imageset/Contents.json new file mode 100644 index 00000000..b34bb4fb --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_off.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "share_off.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_off.imageset/share_off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_off.imageset/share_off.svg new file mode 100644 index 00000000..b7ca28d6 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_off.imageset/share_off.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_selected.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_selected.imageset/Contents.json new file mode 100644 index 00000000..443cb96d --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_selected.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "share_selected.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_selected.imageset/share_selected.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_selected.imageset/share_selected.svg new file mode 100644 index 00000000..ac2ef6f5 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/share_selected.imageset/share_selected.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_off.imageset/Contents.json similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_off.imageset/Contents.json rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_off.imageset/Contents.json diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_off.imageset/Property 1=home, Property 2=off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_off.imageset/Property 1=home, Property 2=off.svg similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_off.imageset/Property 1=home, Property 2=off.svg rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_off.imageset/Property 1=home, Property 2=off.svg diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_on.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_on.imageset/Contents.json similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_on.imageset/Contents.json rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_on.imageset/Contents.json diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_on.imageset/Property 1=home, Property 2=on.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_on.imageset/Property 1=home, Property 2=on.svg similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/home_on.imageset/Property 1=home, Property 2=on.svg rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/home_on.imageset/Property 1=home, Property 2=on.svg diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_off.imageset/Contents.json similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_off.imageset/Contents.json rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_off.imageset/Contents.json diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_off.imageset/Property 1=quest, Property 2=off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_off.imageset/Property 1=quest, Property 2=off.svg similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_off.imageset/Property 1=quest, Property 2=off.svg rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_off.imageset/Property 1=quest, Property 2=off.svg diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_on.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_on.imageset/Contents.json similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_on.imageset/Contents.json rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_on.imageset/Contents.json diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_on.imageset/Property 1=quest, Property 2=on.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_on.imageset/Property 1=quest, Property 2=on.svg similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/quest_on.imageset/Property 1=quest, Property 2=on.svg rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/quest_on.imageset/Property 1=quest, Property 2=on.svg diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_off.imageset/Contents.json similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_off.imageset/Contents.json rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_off.imageset/Contents.json diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_off.imageset/Property 1=user, Property 2=off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_off.imageset/Property 1=user, Property 2=off.svg similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_off.imageset/Property 1=user, Property 2=off.svg rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_off.imageset/Property 1=user, Property 2=off.svg diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_on.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_on.imageset/Contents.json similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_on.imageset/Contents.json rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_on.imageset/Contents.json diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_on.imageset/Property 1=user, Property 2=on.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_on.imageset/Property 1=user, Property 2=on.svg similarity index 100% rename from ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/user_on.imageset/Property 1=user, Property 2=on.svg rename to ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/tabbar/user_on.imageset/Property 1=user, Property 2=on.svg diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/trash.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/trash.imageset/Contents.json new file mode 100644 index 00000000..d633e980 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/trash.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "trash.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/trash.imageset/trash.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/trash.imageset/trash.svg new file mode 100644 index 00000000..25d887f0 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/trash.imageset/trash.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Font/FontManager.swift b/ByeBoo-iOS/ByeBoo-iOS/Resource/Font/FontManager.swift index c9b46554..bea591d6 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Resource/Font/FontManager.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Font/FontManager.swift @@ -7,14 +7,14 @@ import UIKit -public struct FontProperty { +struct FontProperty { let font: UIFont.FontType let size: CGFloat - let lineHeight: CGFloat? + let lineHeight: CGFloat let kern: CGFloat } -public enum FontManager { +enum FontManager { case head1M24 case head2M22 @@ -54,13 +54,13 @@ public enum FontManager { case .body2M16: return FontProperty(font: .medium, size: 16, lineHeight: 130, kern: -1) case .body3R16: - return FontProperty(font: .regular, size: 16, lineHeight: 130, kern: -1) + return FontProperty(font: .regular, size: 16, lineHeight: 150, kern: -1) case .body4Sb14: - return FontProperty(font: .semibold, size: 14, lineHeight: 130, kern: -1) + return FontProperty(font: .semibold, size: 14, lineHeight: 150, kern: -1) case .body5M14: return FontProperty(font: .medium, size: 14, lineHeight: 130, kern: -1) case .body6R14: - return FontProperty(font: .regular, size: 14, lineHeight: 130, kern: -1) + return FontProperty(font: .regular, size: 14, lineHeight: 150, kern: -1) case .cap1M12: return FontProperty(font: .medium, size: 12, lineHeight: 130, kern: -1) @@ -71,11 +71,19 @@ public enum FontManager { } } -public extension FontManager { +extension FontManager { var font: UIFont { guard let font = UIFont(name: fontProperty.font.name, size: fontProperty.size) else { return UIFont() } return font } + + var lineHeight: CGFloat { + return fontProperty.size * (fontProperty.lineHeight / 100.0) + } + + var kern: CGFloat { + return fontProperty.size * (fontProperty.kern / 100.0) + } }