-
Notifications
You must be signed in to change notification settings - Fork 10
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
1 parent
61a91a3
commit 8c8a6c5
Showing
6 changed files
with
99 additions
and
4 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// CollectionReusableView.swift | ||
// BBus | ||
// | ||
// Created by 이지수 on 2021/11/25. | ||
// | ||
|
||
import UIKit | ||
|
||
final class SourceFooterView: UICollectionReusableView { | ||
|
||
static let identifier = "SourceFooterView" | ||
static let height: CGFloat = 100 | ||
|
||
private lazy var sourceLabel: UILabel = { | ||
let label = UILabel() | ||
label.text = "출처 : 서울특별시" | ||
label.font = UIFont.systemFont(ofSize: 15) | ||
label.textColor = BBusColor.bbusGray | ||
return label | ||
}() | ||
|
||
required override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
self.configureLayout() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
self.configureLayout() | ||
} | ||
|
||
private func configureLayout() { | ||
self.addSubviews(self.sourceLabel) | ||
|
||
let half: CGFloat = 0.5 | ||
NSLayoutConstraint.activate([ | ||
self.sourceLabel.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -Self.height * half), | ||
self.sourceLabel.centerXAnchor.constraint(equalTo: self.centerXAnchor) | ||
]) | ||
} | ||
} |