Skip to content

Commit cf27b7e

Browse files
committed
Chore: merge from github
1 parent dc22d4d commit cf27b7e

File tree

13 files changed

+1143
-0
lines changed

13 files changed

+1143
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "dummy.jpg",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
19.1 KB
Loading
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
//
2+
// RegionFilterViewController.swift
3+
// Nagaza
4+
//
5+
// Created by 전성훈 on 2024/02/19.
6+
//
7+
8+
import UIKit
9+
10+
import RxSwift
11+
import SnapKit
12+
13+
final class RegionFilterViewController: NagazaBaseViewController {
14+
private var viewModel: RegionFilterViewModel!
15+
16+
private lazy var mainRegionTableView: UITableView = {
17+
let tableView = UITableView()
18+
tableView.bounces = false
19+
20+
tableView.register(
21+
MainRegionTableViewCell.self,
22+
forCellReuseIdentifier: MainRegionTableViewCell.identifier
23+
)
24+
25+
return tableView
26+
}()
27+
28+
private lazy var subReginTableView: UITableView = {
29+
let tableView = UITableView()
30+
tableView.bounces = false
31+
32+
tableView.register(
33+
SubRegionTableViewCell.self,
34+
forCellReuseIdentifier: SubRegionTableViewCell.identifier
35+
)
36+
37+
return tableView
38+
}()
39+
40+
static func create(with viewModel: RegionFilterViewModel) -> RegionFilterViewController {
41+
let vc = RegionFilterViewController()
42+
vc.viewModel = viewModel
43+
44+
return vc
45+
}
46+
47+
override func viewDidLoad() {
48+
super.viewDidLoad()
49+
50+
}
51+
52+
override func navigationSetting() {
53+
navigationItem.title = "지역 선택"
54+
}
55+
56+
/// 더미 데이터 생성 후 UI 세부 조정 예정
57+
override func makeUI() {
58+
[
59+
mainRegionTableView,
60+
subReginTableView
61+
].forEach {
62+
$0.translatesAutoresizingMaskIntoConstraints = false
63+
self.view.addSubview($0)
64+
}
65+
66+
mainRegionTableView.snp.makeConstraints {
67+
$0.top.equalToSuperview()
68+
$0.leading.equalToSuperview()
69+
$0.width.equalTo(130)
70+
$0.bottom.equalToSuperview()
71+
}
72+
73+
subReginTableView.snp.makeConstraints {
74+
$0.top.equalTo(mainRegionTableView.snp.top)
75+
$0.leading.equalTo(mainRegionTableView.snp.trailing)
76+
$0.trailing.equalToSuperview()
77+
$0.bottom.equalTo(mainRegionTableView.snp.bottom)
78+
}
79+
}
80+
81+
override func bindViewModel() {
82+
83+
}
84+
}
85+
86+
extension Reactive where Base: RegionFilterViewController {
87+
88+
}
89+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// MainRegionTableViewCell.swift
3+
// Nagaza
4+
//
5+
// Created by 전성훈 on 2024/02/20.
6+
//
7+
8+
import UIKit
9+
10+
final class MainRegionTableViewCell: UITableViewCell {
11+
static let identifier = MainRegionTableViewCell.description()
12+
13+
private lazy var regionLabel: UILabel = {
14+
let lbl = UILabel()
15+
16+
return lbl
17+
}()
18+
19+
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
20+
super.init(style: style, reuseIdentifier: reuseIdentifier)
21+
}
22+
23+
required init?(coder: NSCoder) {
24+
fatalError()
25+
}
26+
27+
override func prepareForReuse() {
28+
29+
}
30+
31+
func bind() {
32+
updateInfo()
33+
}
34+
35+
private func updateInfo() {
36+
37+
}
38+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// SubRegionTableViewCell.swift
3+
// Nagaza
4+
//
5+
// Created by 전성훈 on 2024/02/20.
6+
//
7+
8+
import UIKit
9+
10+
final class SubRegionTableViewCell: UITableViewCell {
11+
static let identifier = MainRegionTableViewCell.description()
12+
13+
private lazy var regionLabel: UILabel = {
14+
let lbl = UILabel()
15+
16+
return lbl
17+
}()
18+
19+
private lazy var countLabel: UILabel = {
20+
let lbl = UILabel()
21+
22+
return lbl
23+
}()
24+
25+
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
26+
super.init(style: style, reuseIdentifier: reuseIdentifier)
27+
}
28+
29+
required init?(coder: NSCoder) {
30+
fatalError()
31+
}
32+
33+
override func prepareForReuse() {
34+
35+
}
36+
37+
func bind() {
38+
updateInfo()
39+
}
40+
41+
private func updateInfo() {
42+
43+
}
44+
45+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// LocationFilterViewModel.swift
3+
// Nagaza
4+
//
5+
// Created by 전성훈 on 2024/02/19.
6+
//
7+
8+
import UIKit
9+
10+
import RxSwift
11+
12+
final class RegionFilterViewModel: ViewModelType {
13+
struct Input {
14+
15+
}
16+
17+
struct Output {
18+
19+
}
20+
21+
init() { }
22+
23+
func transform(input: Input) -> Output {
24+
return Output()
25+
}
26+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
//
2+
// BadgeIconView.swift
3+
// Nagaza
4+
//
5+
// Created by 강조은 on 2024/01/08.
6+
//
7+
8+
import UIKit
9+
10+
import SnapKit
11+
12+
final class BadgeIconView: NagazaBaseView {
13+
private let titleText: UILabel = {
14+
let label = UILabel()
15+
label.font = NagazaFontFamily.Pretendard.medium.font(size: 8)
16+
return label
17+
}()
18+
19+
convenience init(type: BadgeIconType) {
20+
self.init()
21+
22+
switch type {
23+
case .mud:
24+
titleText.text = "진흙길"
25+
titleText.textColor = NagazaAsset.Colors.darkbrownMudText.color
26+
backgroundColor = NagazaAsset.Colors.darkbrownMudBackground.color
27+
28+
case .soil:
29+
titleText.text = "흙길"
30+
titleText.textColor = NagazaAsset.Colors.brownSoilText.color
31+
backgroundColor = NagazaAsset.Colors.brownSoilBackground.color
32+
33+
case .grass:
34+
titleText.text = "풀밭길"
35+
titleText.textColor = NagazaAsset.Colors.greenGrassText.color
36+
backgroundColor = NagazaAsset.Colors.greenGrassBackground.color
37+
38+
case .flower:
39+
titleText.text = "꽃길"
40+
titleText.textColor = NagazaAsset.Colors.blueFlowerText.color
41+
backgroundColor = NagazaAsset.Colors.blueFlowerBackground.color
42+
43+
case .flowerGarden:
44+
titleText.text = "꽃밭길"
45+
titleText.textColor = NagazaAsset.Colors.pinkFlowerText.color
46+
backgroundColor = NagazaAsset.Colors.pinkFlowerBackground.color
47+
48+
case .life:
49+
titleText.text = "인생테마"
50+
titleText.textColor = NagazaAsset.Colors.darkbrownMudText.color
51+
backgroundColor = NagazaAsset.Colors.yellowLifeBackground.color
52+
}
53+
}
54+
55+
override func makeUI() {
56+
layer.cornerRadius = 8
57+
58+
initSubviews()
59+
initConstraints()
60+
}
61+
62+
private func initSubviews() {
63+
addSubview(titleText)
64+
}
65+
66+
private func initConstraints() {
67+
titleText.snp.makeConstraints { make in
68+
make.verticalEdges.equalToSuperview().inset(3)
69+
make.horizontalEdges.equalToSuperview().inset(6)
70+
}
71+
}
72+
}
73+
74+
enum BadgeIconType {
75+
case mud
76+
case soil
77+
case grass
78+
case flower
79+
case flowerGarden
80+
case life
81+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//
2+
// RatingView.swift
3+
// Nagaza
4+
//
5+
// Created by 강조은 on 2024/01/08.
6+
//
7+
8+
import UIKit
9+
10+
final class RatingView: NagazaBaseView {
11+
private let starImageView: UIImageView = {
12+
let imageView = UIImageView()
13+
imageView.image = NagazaAsset.Images.icStar.image
14+
return imageView
15+
}()
16+
17+
private let ratingLabel: UILabel = {
18+
let label = UILabel()
19+
label.font = NagazaFontFamily.Pretendard.regular.font(size: 16)
20+
label.textColor = NagazaAsset.Colors.gray3.color
21+
label.text = "3.2"
22+
return label
23+
}()
24+
25+
func setupRatingLabelText(text: String) {
26+
ratingLabel.text = text
27+
}
28+
29+
override func makeUI() {
30+
setup()
31+
initConstraints()
32+
}
33+
34+
private func setup() {
35+
addSubviews([starImageView,
36+
ratingLabel])
37+
}
38+
39+
private func initConstraints() {
40+
starImageView.snp.makeConstraints { make in
41+
make.top.leading.bottom.equalToSuperview()
42+
make.trailing.equalTo(ratingLabel.snp.leading).offset(-3)
43+
make.size.equalTo(15)
44+
}
45+
46+
ratingLabel.snp.makeConstraints { make in
47+
make.top.trailing.bottom.equalToSuperview()
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)