-
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.
- Loading branch information
Showing
12 changed files
with
385 additions
and
54 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
12 changes: 12 additions & 0 deletions
12
Boolti/Boolti/Resources/Assets.xcassets/banner_background.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "banner_background.png", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+667 KB
...olti/Resources/Assets.xcassets/banner_background.imageset/banner_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
Boolti/Boolti/Resources/Assets.xcassets/banner_fire.imageset/Contents.json
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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "banner_fire.png", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+32.2 KB
Boolti/Boolti/Resources/Assets.xcassets/banner_fire.imageset/banner_fire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
// | ||
// Preview.swift | ||
// Boolti | ||
// | ||
// Created by Miro on 8/27/24. | ||
// | ||
import SwiftUI | ||
|
||
#if DEBUG | ||
extension UIViewController { | ||
private struct Preview: UIViewControllerRepresentable { | ||
let viewController: UIViewController | ||
|
||
func makeUIViewController(context: Context) -> UIViewController { | ||
return viewController | ||
} | ||
|
||
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} | ||
} | ||
|
||
func toPreview() -> some View { | ||
Preview(viewController: self) | ||
} | ||
} | ||
#endif | ||
|
||
/// 아래와 같이 PreView를 활용하면 됨 | ||
/* | ||
import SwiftUI | ||
|
||
struct PreView: PreviewProvider { | ||
static var previews: some View { | ||
// Preview를 보고자 하는 ViewController를 넣으면 됩니다. | ||
HomeViewController().toPreview() | ||
} | ||
} | ||
*/ |
96 changes: 96 additions & 0 deletions
96
Boolti/Boolti/Sources/UILayer/Concert/ConcertList/Cells/BannerCollectionViewCell.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,96 @@ | ||
// | ||
// BannerCollectionViewCell.swift | ||
// Boolti | ||
// | ||
// Created by Juhyeon Byun on 8/28/24. | ||
// | ||
|
||
import UIKit | ||
|
||
final class BannerCollectionViewCell: UICollectionViewCell { | ||
|
||
// MARK: UI Component | ||
|
||
private let backgroundImageView: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.clipsToBounds = true | ||
imageView.contentMode = .scaleAspectFill | ||
imageView.image = .bannerBackground | ||
imageView.layer.cornerRadius = 8 | ||
return imageView | ||
}() | ||
|
||
private let fireImageView: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.clipsToBounds = true | ||
imageView.image = .bannerFire | ||
return imageView | ||
}() | ||
|
||
private let subTitleLabel: BooltiUILabel = { | ||
let label = BooltiUILabel() | ||
label.font = .caption | ||
label.textColor = .grey05 | ||
label.text = "지금 공연의 불을 지펴보세요!" | ||
return label | ||
}() | ||
|
||
private let mainTitleLabel: BooltiUILabel = { | ||
let label = BooltiUILabel() | ||
label.font = .aggroB(16) | ||
label.textColor = .grey05 | ||
label.text = "공연 등록하러 가기" | ||
return label | ||
}() | ||
|
||
private lazy var labelStackView: UIStackView = { | ||
let stackView = UIStackView() | ||
stackView.axis = .vertical | ||
stackView.spacing = 2 | ||
stackView.alignment = .leading | ||
stackView.addArrangedSubviews([self.subTitleLabel, | ||
self.mainTitleLabel]) | ||
return stackView | ||
}() | ||
|
||
// MARK: Init | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
self.configureUI() | ||
self.configureConstraints() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError() | ||
} | ||
} | ||
|
||
// MARK: - UI | ||
|
||
extension BannerCollectionViewCell { | ||
|
||
private func configureUI() { | ||
self.contentView.addSubview(self.backgroundImageView) | ||
self.backgroundImageView.addSubviews([self.fireImageView, | ||
self.labelStackView]) | ||
} | ||
|
||
private func configureConstraints() { | ||
self.backgroundImageView.snp.makeConstraints { make in | ||
make.edges.equalToSuperview() | ||
} | ||
|
||
self.fireImageView.snp.makeConstraints { make in | ||
make.trailing.equalToSuperview().inset(24) | ||
make.height.equalToSuperview() | ||
make.width.equalTo(self.fireImageView.snp.height) | ||
} | ||
|
||
self.labelStackView.snp.makeConstraints { make in | ||
make.leading.equalToSuperview().inset(24) | ||
make.centerY.equalToSuperview() | ||
} | ||
} | ||
} |
Oops, something went wrong.