Skip to content

Commit

Permalink
[#57] 컬러 팔레트 색상 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
MojitoBar committed Jun 9, 2023
1 parent 58cd195 commit 792b2f5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MyPack/Main/View/UI/Card.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Card: UIView {
super.init(frame: CGRect.zero)

self.backgroundColor = color
layer.borderWidth = 3
layer.borderWidth = 7
layer.borderColor = color.cgColor

layer.cornerRadius = 10
Expand Down
3 changes: 3 additions & 0 deletions MyPack/Main/View/ViewController/FirstViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class FirstViewController: UIViewController {
extension FirstViewController {
override func viewDidLoad() {
super.viewDidLoad()
}

override func viewWillAppear(_: Bool) {
viewModel.getCardList(token: "") { result in
switch result {
case .success:
Expand Down
31 changes: 22 additions & 9 deletions MyPack/Main/View/ViewController/SecondViewContorller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,24 @@ class SecondViewController: UIViewController {
lazy var styles: [UIButton] = {
var styles: [UIButton] = []
styles.append(contentsOf: [
StyleButton(color: UIColor(rgb: 0xC501E2), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0x2EF8A0), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xE7C500), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xF82D97), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xE830CE), viewModel: viewModel)
StyleButton(color: UIColor(rgb: 0xFF5CE4), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFF73C6), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFFA77D), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFFE25C), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFCFF62), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0x7FE960), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0x5502BD), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFF0398), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFF5E5E), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFDA703), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFFEC03), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xDAF802), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xCF8BF9), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFFADF1), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFFBDD2), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFDDEBE), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xFFF5BA), viewModel: viewModel),
StyleButton(color: UIColor(rgb: 0xF1FA7A), viewModel: viewModel)
])
return styles
}()
Expand Down Expand Up @@ -61,7 +74,7 @@ class SecondViewController: UIViewController {
}
}
}), for: .touchUpInside)
btn.titleLabel?.font = UIFont.systemFont(ofSize: 28, weight: .bold)
btn.titleLabel?.font = UIFont.systemFont(ofSize: 26, weight: .bold)
return btn
}()

Expand Down Expand Up @@ -128,7 +141,7 @@ class SecondViewController: UIViewController {
lazy var selectedImage: UIImageView = {
let imageView = UIImageView()
imageView.contentMode = .scaleAspectFill
imageView.layer.borderWidth = 5
imageView.layer.borderWidth = 7
imageView.layer.borderColor = UIColor.white.cgColor
imageView.layer.cornerRadius = 16
imageView.clipsToBounds = true
Expand All @@ -141,7 +154,7 @@ class SecondViewController: UIViewController {
lazy var backView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.borderWidth = 5
view.layer.borderWidth = 7
view.layer.borderColor = UIColor.white.cgColor
view.layer.cornerRadius = 16
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(frontFlipView))
Expand All @@ -153,7 +166,7 @@ class SecondViewController: UIViewController {
init(viewModel: SecondViewModel) {
self.viewModel = viewModel
super.init(nibName: nil, bundle: nil)
view.backgroundColor = UIColor(rgb: 0x222222)
view.backgroundColor = UIColor(rgb: 0x111111)
}

@available(*, unavailable)
Expand Down

0 comments on commit 792b2f5

Please sign in to comment.