-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Network/#51
- Loading branch information
Showing
9 changed files
with
401 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Program/Cell/SupportCollectionViewCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// | ||
// SupportCollectionViewCell.swift | ||
// SOPKATHON_33-iOS | ||
// | ||
// Created by 티모시 킴 on 11/26/23. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
import Then | ||
|
||
final class SupportCollectionViewCell: UICollectionViewCell { | ||
|
||
// MARK: - UI Components | ||
|
||
private let backgroundImageView = UIImageView() | ||
private let titleLabel = UILabel() | ||
private let areaLabel = UILabel() | ||
private let updateLabel = UILabel() | ||
|
||
// MARK: - Life Cycle | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
style() | ||
hieararchy() | ||
layout() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - Custom Method | ||
|
||
private func style() { | ||
contentView.do { | ||
$0.backgroundColor = .gray700 | ||
$0.makeCornerRound(ratio: 10) | ||
} | ||
|
||
backgroundImageView.do { | ||
$0.contentMode = .scaleAspectFill | ||
$0.image = Image.dummy1 | ||
} | ||
|
||
titleLabel.do { | ||
$0.text = "프로그램 명을 입력해주세요." | ||
$0.font = UIFont(name: "Pretendard-SemiBold", size: 14) | ||
$0.textColor = .white | ||
$0.textAlignment = .left | ||
$0.numberOfLines = 0 | ||
} | ||
|
||
areaLabel.do { | ||
$0.text = "솝트광역시" | ||
$0.font = UIFont(name: "Pretendard-regular", size: 12) | ||
$0.textColor = .gray400 | ||
$0.textAlignment = .left | ||
} | ||
updateLabel.do { | ||
$0.text = "00.00" | ||
$0.font = UIFont(name: "Pretendard-regular", size: 12) | ||
$0.textColor = .gray400 | ||
$0.textAlignment = .left | ||
} | ||
|
||
} | ||
|
||
private func hieararchy() { | ||
contentView.addSubviews( | ||
backgroundImageView, | ||
titleLabel, | ||
areaLabel, | ||
updateLabel | ||
) | ||
} | ||
|
||
private func layout() { | ||
backgroundImageView.snp.makeConstraints { | ||
$0.top.leading.trailing.equalToSuperview() | ||
$0.height.equalTo(115) | ||
} | ||
|
||
titleLabel.snp.makeConstraints { | ||
$0.top.equalToSuperview().offset(130.adjusted) | ||
$0.leading.trailing.equalToSuperview().inset(12.adjusted) | ||
} | ||
|
||
areaLabel.snp.makeConstraints { | ||
$0.top.equalTo(titleLabel.snp.bottom).offset(10.adjusted) | ||
$0.leading.equalTo(titleLabel) | ||
} | ||
|
||
updateLabel.snp.makeConstraints { | ||
$0.leading.equalTo(areaLabel.snp.trailing).offset(10.adjusted) | ||
$0.top.equalTo(areaLabel) | ||
} | ||
} | ||
|
||
func dataBind() { | ||
} | ||
} | ||
|
||
|
53 changes: 53 additions & 0 deletions
53
...3-iOS/SOPKATHON_33-iOS/Presentation/Program/View/AssitantView/SupportCollectionView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// SupportCollectionView.swift | ||
// SOPKATHON_33-iOS | ||
// | ||
// Created by 티모시 킴 on 11/26/23. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
import Then | ||
|
||
final class SupportCollectionView: UICollectionView { | ||
|
||
// MARK: - Life Cycle | ||
|
||
override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) { | ||
super.init(frame: .zero, collectionViewLayout: .init()) | ||
|
||
register() | ||
style() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - Custom Method | ||
|
||
private func register() { | ||
self.register( | ||
SupportCollectionViewCell.self, | ||
forCellWithReuseIdentifier: SupportCollectionViewCell.cellIdentifier | ||
) | ||
} | ||
|
||
private func style() { | ||
self.do { | ||
let layout = UICollectionViewFlowLayout() | ||
layout.scrollDirection = .vertical | ||
layout.minimumLineSpacing = 17 | ||
layout.minimumInteritemSpacing = 17 | ||
|
||
$0.collectionViewLayout = layout | ||
$0.showsHorizontalScrollIndicator = false | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
75 changes: 75 additions & 0 deletions
75
...ATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Program/View/AssitantView/SupportTopView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// | ||
// SupportTopView.swift | ||
// SOPKATHON_33-iOS | ||
// | ||
// Created by 티모시 킴 on 11/26/23. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
import Then | ||
|
||
final class SupportTopView: UIView { | ||
|
||
// MARK: - Properties | ||
|
||
lazy var backButton = UIButton() | ||
let supportLabel = UILabel() | ||
|
||
// MARK: - UI Components | ||
|
||
// MARK: - Life Cycle | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
style() | ||
hieararchy() | ||
layout() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - Custom Method | ||
|
||
private func style() { | ||
backButton.do { | ||
$0.setImage(UIImage(systemName: "chevron.backward"), for: .normal) | ||
$0.tintColor = .white | ||
} | ||
|
||
supportLabel.do { | ||
$0.font = UIFont(name: "Pretendard-SemiBold", size: 18) | ||
$0.text = "지원 현황" | ||
$0.textColor = .white | ||
} | ||
} | ||
|
||
private func hieararchy() { | ||
self.addSubviews( | ||
backButton, supportLabel | ||
) | ||
} | ||
|
||
private func layout() { | ||
backButton.snp.makeConstraints { | ||
$0.top.equalToSuperview() | ||
$0.leading.equalToSuperview().offset(30) | ||
$0.size.equalTo(24) | ||
} | ||
|
||
supportLabel.snp.makeConstraints { | ||
$0.centerY.equalToSuperview() | ||
$0.leading.equalTo(backButton.snp.trailing).offset(10) | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.