Skip to content

Commit

Permalink
Feat [#39] HeaderView 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed May 26, 2023
1 parent 5b71093 commit 142a6dd
Showing 1 changed file with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,48 @@

import UIKit

class ReviewViewController: BaseViewController {
import SnapKit
import Then

final class ReviewViewController: UIViewController {

let headerView = HeaderView()

lazy var headerViewTitle = UILabel().then {
$0.font = .title
$0.addLineHeight(lineHeight: 28)
$0.text = "거래후기"
}

override func viewDidLoad() {
super.viewDidLoad()

setStyle()
setLayout()
}
}

extension ReviewViewController {
private func setStyle() {
view.backgroundColor = .white
navigationController?.setNavigationBarHidden(true, animated: true)
}

private func setLayout() {
view.addSubviews(
headerView
)
headerView.addSubviews(headerViewTitle)

headerView.snp.makeConstraints {
$0.top.equalToSuperview().offset(44)
$0.horizontalEdges.equalTo(self.view.safeAreaLayoutGuide)
$0.height.equalTo(44)
}

headerViewTitle.snp.makeConstraints {
$0.centerY.equalToSuperview()
$0.centerX.equalToSuperview()
}
}
}

0 comments on commit 142a6dd

Please sign in to comment.