Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions iBox/Sources/Base/BaseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BaseViewController<View: UIView>: UIViewController {

let backgroundColor: UIColor = .backgroundColor
let tintColor: UIColor = .label
let titleFont: UIFont = .systemFont(ofSize: 20, weight: .semibold)
let titleFont: UIFont = .titleFont

// MARK: - UI Components

Expand All @@ -34,16 +34,16 @@ class BaseViewController<View: UIView>: UIViewController {
let navigationBar = NavigationBar().then {
$0.backButton.configuration = .plain()
$0.backButton.configuration?.image = UIImage(systemName: "chevron.left")
$0.backButton.configuration?.preferredSymbolConfigurationForImage = .init(weight: .bold)
$0.backButton.configuration?.preferredSymbolConfigurationForImage = .init(weight: .semibold)
$0.addButton.configuration = .plain()
$0.addButton.configuration?.image = UIImage(systemName: "plus")
$0.addButton.configuration?.preferredSymbolConfigurationForImage = .init(weight: .bold)
$0.addButton.configuration?.preferredSymbolConfigurationForImage = .init(weight: .semibold)
$0.moreButton.configuration = .plain()
$0.moreButton.configuration?.image = UIImage(systemName: "ellipsis.circle")
$0.moreButton.configuration?.preferredSymbolConfigurationForImage = .init(weight: .bold)
$0.moreButton.configuration?.preferredSymbolConfigurationForImage = .init(weight: .semibold)
$0.doneButton.configuration = .plain()
$0.doneButton.configuration?.baseForegroundColor = .label
$0.doneButton.configuration?.attributedTitle = AttributedString("완료", attributes: AttributeContainer([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18, weight: .semibold)]))
$0.doneButton.configuration?.attributedTitle = AttributedString("완료", attributes: AttributeContainer([NSAttributedString.Key.font: UIFont.semiboldLabelFont]))
}

let contentView: UIView = View()
Expand Down
14 changes: 7 additions & 7 deletions iBox/Sources/BoxList/AddBookmark/AddBookmarkView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class AddBookmarkView: UIView {

private let nameTextViewPlaceHolder = UILabel().then {
$0.text = "북마크 이름"
$0.font = UIFont.systemFont(ofSize: 18)
$0.font = .cellTitleFont
$0.textColor = .systemGray3
}

let nameTextView = UITextView().then {
$0.backgroundColor = .clear
$0.layer.borderWidth = 0
$0.textContainerInset = UIEdgeInsets(top: 7, left: 0, bottom: 0, right: 0)
$0.font = UIFont.systemFont(ofSize: 16)
$0.font = .cellTitleFont
$0.textColor = .label
$0.isScrollEnabled = true
}
Expand All @@ -49,15 +49,15 @@ class AddBookmarkView: UIView {

private let urlTextViewPlaceHolder = UILabel().then {
$0.text = "URL"
$0.font = UIFont.systemFont(ofSize: 18)
$0.font = .cellTitleFont
$0.textColor = .systemGray3
}

let urlTextView = UITextView().then {
$0.backgroundColor = .clear
$0.layer.borderWidth = 0
$0.textContainerInset = UIEdgeInsets(top: 7, left: 0, bottom: 0, right: 0)
$0.font = UIFont.systemFont(ofSize: 16)
$0.font = .cellTitleFont
$0.textColor = .label
$0.isScrollEnabled = true
}
Expand All @@ -66,18 +66,18 @@ class AddBookmarkView: UIView {
$0.backgroundColor = UIColor.backgroundColor
$0.layer.cornerRadius = 10
$0.clipsToBounds = true
$0.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
$0.titleLabel?.font = .cellTitleFont
$0.isEnabled = true
}

private let buttonLabel = UILabel().then {
$0.text = "목록"
$0.font = UIFont.systemFont(ofSize: 17)
$0.font = .cellTitleFont
$0.textColor = .label
}

let selectedFolderLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 17)
$0.font = .descriptionFont
$0.textColor = .systemGray
$0.textAlignment = .right
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class AddBookmarkViewController: UIViewController {
navigationItem.rightBarButtonItem?.isEnabled = false

let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.boldSystemFont(ofSize: 17)
.font: UIFont.semiboldLabelFont
]

navigationItem.leftBarButtonItem?.setTitleTextAttributes(attributes, for: .normal)
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/BoxList/AddBookmark/FolderListCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class FolderListCell: UITableViewCell {

let folderNameLabel = UILabel().then {
$0.textColor = .label
$0.font = .systemFont(ofSize: 17, weight: .regular)
$0.font = .cellTitleFont
}

private let checkImageView = UIImageView().then {
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/BoxList/AddBookmark/FolderListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class FolderListView: UIView {

private let infoLabel = UILabel().then {
$0.text = "새로운 북마크를 추가할 폴더를 선택해주세요."
$0.font = UIFont.boldSystemFont(ofSize: 17)
$0.font = .semiboldLabelFont
$0.textColor = .label
$0.textAlignment = .center
}
Expand Down
6 changes: 4 additions & 2 deletions iBox/Sources/BoxList/BoxListCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class BoxListCell: UITableViewCell {
$0.contentMode = .scaleAspectFit
}

private let label = UILabel()
private let label = UILabel().then {
$0.font = .cellTitleFont
}

private let editButton = UIButton().then{
$0.configuration = .plain()
Expand Down Expand Up @@ -79,7 +81,7 @@ class BoxListCell: UITableViewCell {
cellImageView.snp.makeConstraints { make in
make.leading.equalToSuperview().inset(20)
make.top.bottom.equalToSuperview().inset(10)
make.width.equalTo(30)
make.width.equalTo(25)
}

label.snp.makeConstraints { make in
Expand Down
1 change: 1 addition & 0 deletions iBox/Sources/BoxList/Edit/EditCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class EditCell: UITableViewCell {
}

private let titleLabel = UILabel().then {
$0.font = .cellTitleFont
$0.textColor = .label
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class EditFolderViewController: BaseViewController<EditFolderView>, BaseViewCont

func setupNavigationBar() {
setNavigationBarTitleLabelText("폴더 관리")
setNavigationBarTitleLabelFont(.systemFont(ofSize: 17, weight: .semibold))
setNavigationBarTitleLabelFont(.semiboldLabelFont)
setNavigationBarAddButtonHidden(false)
setNavigationBarBackButtonHidden(false)
setNavigationBarAddButtonAction(#selector(addButtonTapped))
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/BoxList/FolderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FolderView: UIView {

private let folderNameLabel = UILabel().then {
$0.textColor = .label
$0.font = .systemFont(ofSize: 18, weight: .semibold)
$0.font = .boldLabelFont
}

init() {
Expand Down
21 changes: 21 additions & 0 deletions iBox/Sources/Extension/UIFont+Extension.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// UIFont+Extension.swift
// iBox
//
// Created by jiyeon on 3/26/24.
//

import UIKit

extension UIFont {

static let titleFont = UIFont.systemFont(ofSize: 20.0, weight: .bold)
static let subTitlefont = UIFont.systemFont(ofSize: 17.0, weight: .semibold)
static let lableFont = UIFont.systemFont(ofSize: 16.0)
static let semiboldLabelFont = UIFont.systemFont(ofSize: 16.0, weight: .semibold)
static let boldLabelFont = UIFont.systemFont(ofSize: 16.0, weight: .bold)
static let cellTitleFont = UIFont.systemFont(ofSize: 16.0)
static let cellDescriptionFont = UIFont.systemFont(ofSize: 13.0, weight: .regular)
static let descriptionFont = UIFont.systemFont(ofSize: 14.0)

}
2 changes: 1 addition & 1 deletion iBox/Sources/Settings/HomeTab/HomeTabSelectorCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HomeTabSelectorCell: UITableViewCell {
// MARK: - UI Components

let titleLabel = UILabel().then {
$0.font = .systemFont(ofSize: 16)
$0.font = .cellTitleFont
}

let selectButton = UIButton().then {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HomeTabSelectorViewController: BaseViewController<HomeTabSelectorView>, Ba

func setupNavigationBar() {
setNavigationBarTitleLabelText("홈화면 설정하기")
setNavigationBarTitleLabelFont(.systemFont(ofSize: 17, weight: .semibold))
setNavigationBarTitleLabelFont(.subTitlefont)
setNavigationBarBackButtonHidden(false)
}

Expand Down
4 changes: 2 additions & 2 deletions iBox/Sources/Settings/Reset/ResetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class ResetView: UIView {
let label = UILabel().then {
$0.text = "경고: 이 작업을 진행하면 저장하신 모든 폴더 및 북마크 정보가 영구적으로 삭제되고 기본값으로 초기화됩니다. 진행하기 전에 중요한 정보가 없는지 다시 한번 확인해 주시기 바랍니다."
$0.numberOfLines = 0
$0.font = .systemFont(ofSize: 15)
$0.font = .descriptionFont
}

let resetButton = UIButton().then {
$0.configuration = .plain()
$0.configuration?.attributedTitle = .init("초기화", attributes: .init([.font: UIFont.boldSystemFont(ofSize: 15)]))
$0.configuration?.attributedTitle = .init("초기화", attributes: .init([.font: UIFont.descriptionFont]))
$0.tintColor = .white
$0.backgroundColor = .box
$0.clipsToBounds = true
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Settings/Reset/ResetViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ResetViewController: BaseViewController<ResetView>, BaseViewControllerProt

func setupNavigationBar() {
setNavigationBarTitleLabelText("데이터 초기화")
setNavigationBarTitleLabelFont(.systemFont(ofSize: 17, weight: .semibold))
setNavigationBarTitleLabelFont(.subTitlefont)
setNavigationBarBackButtonHidden(false)
}

Expand Down
4 changes: 2 additions & 2 deletions iBox/Sources/Settings/SettingsItemCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class SettingsItemCell: UITableViewCell {
// MARK: - UI Components

let titleLabel = UILabel().then {
$0.font = .systemFont(ofSize: 16)
$0.font = .cellTitleFont
}

let descriptionLabel = UILabel().then {
$0.font = .systemFont(ofSize: 13, weight: .regular)
$0.font = .cellDescriptionFont
$0.textColor = .gray
}

Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Settings/Theme/ThemeCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ThemeCell: UITableViewCell {
}

let titleLabel = UILabel().then {
$0.font = .systemFont(ofSize: 16)
$0.font = .cellTitleFont
}

let selectButton = UIButton().then {
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Settings/Theme/ThemeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ThemeViewController: BaseViewController<ThemeView>, BaseViewControllerProt

func setupNavigationBar() {
setNavigationBarTitleLabelText("다크 모드 설정")
setNavigationBarTitleLabelFont(.systemFont(ofSize: 17, weight: .semibold))
setNavigationBarTitleLabelFont(.subTitlefont)
setNavigationBarBackButtonHidden(false)
}

Expand Down