Skip to content

Commit

Permalink
[Feat/#29] Challenge - Header Layout 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe0929 committed Jan 8, 2024
1 parent 3d7f08d commit dbe87a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class GrayBackgroundView: UICollectionReusableView {
private func setConstraints() {
grayBackgroundView.snp.makeConstraints {
$0.leading.trailing.bottom.equalToSuperview()
$0.top.equalToSuperview().offset(-100)
$0.top.equalToSuperview().offset(-200)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ final class ChallengeViewController: UIViewController {
isBackButton: false,
isTitleLabel: true,
isPointImage: true,
isBackGroundGray: true,
titleText: StringLiteral.Challenge.NavigationBarTitle)
private let challengeView = ChallengeView()

Expand All @@ -39,8 +40,7 @@ final class ChallengeViewController: UIViewController {

private func setConstraints() {
navigationBar.snp.makeConstraints {
$0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide)
$0.height.equalTo(63.adjustedHeight)
$0.top.leading.trailing.equalToSuperview()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ extension ChallengeView {
section.contentInsets = .init(top: 0, leading: 0, bottom: 35, trailing:0)


let headerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(145.adjustedHeight))
let headerHeight = UIScreen().isLongerThan812pt ? 145 : 165
let headerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(CGFloat(headerHeight)))

let headerElement = NSCollectionLayoutBoundarySupplementaryItem(layoutSize: headerSize,
elementKind: StringLiteral.Challenge.Idetifier.titleHeaderViewId,
Expand Down

0 comments on commit dbe87a5

Please sign in to comment.