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
2 changes: 1 addition & 1 deletion iBox/Sources/Base/BaseBottomSheetViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class BaseBottomSheetViewController<View: BaseView>: UIViewController {
$0.height.equalTo(bottomSheetHeight)
}
UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseIn, animations: {
self.dimmedView.backgroundColor = ColorPalette.dimmedViewColor
self.dimmedView.backgroundColor = .dimmedViewColor
self.view.layoutIfNeeded()
})
}
Expand Down
4 changes: 2 additions & 2 deletions iBox/Sources/Base/BaseNavigationBarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BaseNavigationBarViewController<View: BaseView>: UIViewController, BaseNav

// MARK: - properties

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

Expand Down Expand Up @@ -134,7 +134,7 @@ class BaseNavigationBarViewController<View: BaseView>: UIViewController, BaseNav
// MARK: - functions

private func configureUI() {
view.backgroundColor = .systemBackground
view.backgroundColor = .backgroundColor
view.addSubview(statusBar)
view.addSubview(navigationBar)
navigationBar.addSubview(navigationBar.backButton)
Expand Down
22 changes: 19 additions & 3 deletions iBox/Sources/Extension/UIColor+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,24 @@ extension UIColor {
)
}

class var box: UIColor { UIColor(hex: 0xFF7F29) }
class var box2: UIColor { UIColor(hex: 0xFF9548) }
class var box3: UIColor { UIColor(hex: 0xFFDC6E) }
private static func color(light: UIColor, dark: UIColor) -> UIColor {
return UIColor { traitCollection in
switch traitCollection.userInterfaceStyle {
case .dark:
return dark
default:
return light
}
}
}

static let box = UIColor(hex: 0xFF7F29)
static let box2 = UIColor(hex: 0xFF9548)
static let box3 = UIColor(hex: 0xFFDC6E)
static let tableViewBackgroundColor = color(light: .systemGroupedBackground, dark: .systemGray5)
static let floderGray = color(light: .systemGray3, dark: .systemGray2)
static let webIconColor = color(light: .black, dark: .systemGray)
static let dimmedViewColor = UIColor.black.withAlphaComponent(0.75)
static let backgroundColor = color(light: .white, dark: UIColor(hex: 0x242424))

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AddBookmarkBottomSheetView: BaseView {
// MARK: - configure UI

override func configureUI() {
backgroundColor = .systemBackground
backgroundColor = .backgroundColor
}

}
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/BoxList/BoxListCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class BoxListCell: UITableViewCell {

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
backgroundColor = .systemGroupedBackground
backgroundColor = .tableViewBackgroundColor

setupLayout()
}
Expand Down
6 changes: 3 additions & 3 deletions iBox/Sources/Presenter/BoxList/BoxListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BoxListView: BaseView {
override init(frame: CGRect) {
super.init(frame: frame)

backgroundColor = .systemBackground
backgroundColor = .backgroundColor
viewModel = BoxListViewModel()

setupLayout()
Expand All @@ -41,7 +41,7 @@ class BoxListView: BaseView {
let view = UIView()
view.clipsToBounds = true
view.layer.cornerRadius = 20
view.backgroundColor = .systemGroupedBackground
view.backgroundColor = .tableViewBackgroundColor

view.addSubview(tableView)
tableView.snp.makeConstraints { make in
Expand Down Expand Up @@ -115,7 +115,7 @@ extension BoxListView: UITableViewDelegate {
make.top.bottom.equalToSuperview()
make.leading.trailing.equalToSuperview().inset(15)
}
view.backgroundColor = ColorPalette.tableViewBackgroundColor
view.backgroundColor = .clear
line.backgroundColor = .tertiaryLabel
return view
}
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/BoxList/FolderButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FolderButton: UIButton {
init(isOpen: Bool) {
self.isOpen = isOpen
super.init(frame: .zero)
backgroundColor = .systemGroupedBackground
backgroundColor = .tableViewBackgroundColor

setupLayout()
}
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/Favorite/FavoriteView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FavoriteView: PreloadedWebView {

override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .systemBackground
backgroundColor = .backgroundColor

setupLayout()
}
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/MainTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MainTabBarController: UITabBarController {

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
view.backgroundColor = .backgroundColor

setupTabBar()
setupTabBarAppearance()
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MainView: UIView {
// MARK: - configure UI

func configureUI() {
backgroundColor = .systemBackground
backgroundColor = .backgroundColor

addSubview(label)

Expand Down
1 change: 1 addition & 0 deletions iBox/Sources/Presenter/MyPage/MyPageItemCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class MyPageItemCell: UITableViewCell, BaseViewProtocol {
// MARK: - BaseViewProtocol

func configureUI() {
backgroundColor = .clear
addSubview(titleLabel)
addSubview(descriptionLabel)
addSubview(chevronButton)
Expand Down
3 changes: 2 additions & 1 deletion iBox/Sources/Presenter/MyPage/MyPageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class MyPageView: BaseView {
$0.register(MyPageItemCell.self, forCellReuseIdentifier: "MyPageItemCell")
$0.separatorStyle = .none
$0.sectionHeaderTopPadding = 0
$0.backgroundColor = .clear
}

// MARK: - Initializer
Expand Down Expand Up @@ -156,7 +157,7 @@ extension MyPageView: UITableViewDelegate, UITableViewDataSource {
// 섹션 헤더의 View 설정
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let headerView = UIView()
headerView.backgroundColor = .systemGroupedBackground
headerView.backgroundColor = .backgroundColor
return headerView
}

Expand Down
1 change: 1 addition & 0 deletions iBox/Sources/Presenter/MyPage/Theme/ThemeCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ThemeCell: UITableViewCell, BaseViewProtocol {
// MARK: - BaseViewProtocol

func configureUI() {
backgroundColor = .clear
addSubview(themeImageView)
addSubview(titleLabel)
addSubview(selectButton)
Expand Down
1 change: 1 addition & 0 deletions iBox/Sources/Presenter/MyPage/Theme/ThemeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ThemeView: BaseView {
$0.register(ThemeCell.self, forCellReuseIdentifier: "ThemeCell")
$0.separatorStyle = .none
$0.sectionHeaderTopPadding = 0
$0.backgroundColor = .clear
}

// MARK: - Initializer
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/Web/PreloadedWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PreloadedWebView: BaseView {

override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .systemBackground
backgroundColor = .backgroundColor
}

required init?(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PreloadedWebViewController: BaseNavigationBarViewController<PreloadedWebVi

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
view.backgroundColor = .backgroundColor
navigationItem.largeTitleDisplayMode = .never

guard let contentView = contentView as? PreloadedWebView else { return }
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/Web/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class WebView: BaseView {

override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .systemBackground
backgroundColor = .backgroundColor

setupLayout()
}
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/Presenter/Web/WebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WebViewController: BaseNavigationBarViewController<WebView> {

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
view.backgroundColor = .backgroundColor
navigationItem.largeTitleDisplayMode = .never

guard let contentView = contentView as? WebView else { return }
Expand Down
31 changes: 31 additions & 0 deletions iBox/Sources/Utils/ColorName.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// ColorName.swift
// iBox
//
// Created by 이지현 on 1/3/24.
//

import UIKit

enum ColorName: String {
case gray
case green
case red
case blue
case yellow

func toUIColor() -> UIColor {
switch self {
case .gray:
return UIColor.systemGray2
case .green:
return UIColor.systemGreen
case .red:
return UIColor.systemRed
case .blue:
return UIColor.systemBlue
case .yellow:
return UIColor.systemYellow
}
}
}
76 changes: 0 additions & 76 deletions iBox/Sources/Utils/ColorPalette.swift

This file was deleted.