-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
288 additions
and
15 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Footer/HomeFooterCell.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,29 @@ | ||
// | ||
// HomeFooterCell.swift | ||
// NadoSunbae | ||
// | ||
// Created by madilyn on 2022/08/05. | ||
// | ||
|
||
import UIKit | ||
|
||
class HomeFooterCell: UITableViewCell { | ||
|
||
// MARK: - Initialization | ||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
configureUI() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} | ||
|
||
// MARK: - UI | ||
extension HomeFooterCell { | ||
private func configureUI() { | ||
tintColor = .clear | ||
backgroundColor = .gray0 | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeBannerHeaderCell.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,55 @@ | ||
// | ||
// HomeBannerHeaderCell.swift | ||
// NadoSunbae | ||
// | ||
// Created by madilyn on 2022/08/05. | ||
// | ||
|
||
import UIKit | ||
|
||
class HomeBannerHeaderCell: UITableViewCell { | ||
|
||
// MARK: Components | ||
private let logoImgView = UIImageView().then { | ||
$0.image = UIImage(named: "logoLogin") | ||
$0.contentMode = .scaleAspectFill | ||
} | ||
private let univLabel = UILabel().then { | ||
$0.textAlignment = .right | ||
$0.font = .PretendardM(size: 14) | ||
$0.textColor = .gray4 | ||
$0.text = "고려대학교" | ||
} | ||
|
||
// MARK: - Initialization | ||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
configureUI() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} | ||
|
||
// MARK: - UI | ||
extension HomeBannerHeaderCell { | ||
private func configureUI() { | ||
tintColor = .white | ||
backgroundColor = .white | ||
|
||
addSubviews([logoImgView, univLabel]) | ||
|
||
logoImgView.snp.makeConstraints { | ||
$0.left.equalToSuperview().inset(20) | ||
$0.centerY.equalToSuperview() | ||
$0.width.equalTo(82.adjusted) | ||
$0.height.equalTo(28.adjusted) | ||
} | ||
|
||
univLabel.snp.makeConstraints { | ||
$0.right.equalToSuperview().inset(20) | ||
$0.centerY.equalToSuperview() | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeTitleHeaderCell.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,47 @@ | ||
// | ||
// HomeTitleHeaderCell.swift | ||
// NadoSunbae | ||
// | ||
// Created by madilyn on 2022/08/05. | ||
// | ||
|
||
import UIKit | ||
|
||
class HomeTitleHeaderCell: UITableViewCell { | ||
|
||
// MARK: Components | ||
private let titleLabel = UILabel().then { | ||
$0.font = .PretendardB(size: 18) | ||
$0.textColor = .mainBlack | ||
} | ||
|
||
// MARK: - Initialization | ||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
configureUI() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
func setTitleLabel(titleText: String) { | ||
titleLabel.text = titleText | ||
titleLabel.sizeToFit() | ||
} | ||
} | ||
|
||
// MARK: - UI | ||
extension HomeTitleHeaderCell { | ||
private func configureUI() { | ||
tintColor = .white | ||
backgroundColor = .white | ||
|
||
addSubviews([titleLabel]) | ||
|
||
titleLabel.snp.makeConstraints { | ||
$0.top.equalToSuperview().inset(40) | ||
$0.left.equalToSuperview().inset(24) | ||
} | ||
} | ||
} |
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
Oops, something went wrong.