diff --git a/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/AppListCollectionViewCell.swift b/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/AppListCollectionViewCell.swift index 4347980..2146424 100644 --- a/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/AppListCollectionViewCell.swift +++ b/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/AppListCollectionViewCell.swift @@ -13,7 +13,7 @@ class AppListCollectionViewCell: UICollectionViewCell { let appImageView = UIImageView().then { $0.backgroundColor = .blue - $0.makeCornerRound(radius: 8) + $0.makeCornerRound(radius: 8.adjusted) } let appNameLabel = UILabel().then { @@ -47,25 +47,25 @@ class AppListCollectionViewCell: UICollectionViewCell { private func setViewHierarchy() { self.backgroundColor = .clear contentView.backgroundColor = .gray7 - contentView.makeCornerRound(radius: 6) + contentView.makeCornerRound(radius: 6.adjusted) contentView.addSubviews(appImageView, appNameLabel, timeLabel) } private func setConstraints() { appImageView.snp.makeConstraints { - $0.size.equalTo(40) - $0.leading.equalToSuperview().offset(17) + $0.size.equalTo(40.adjusted) + $0.leading.equalToSuperview().offset(17.adjustedWidth) $0.centerY.equalToSuperview() } appNameLabel.snp.makeConstraints { - $0.leading.equalTo(appImageView.snp.trailing).offset(14) + $0.leading.equalTo(appImageView.snp.trailing).offset(14.adjustedWidth) $0.centerY.equalToSuperview() } timeLabel.snp.makeConstraints { - $0.trailing.equalToSuperview().inset(27) + $0.trailing.equalToSuperview().inset(27.adjustedWidth) $0.centerY.equalToSuperview() } diff --git a/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/DateCollectionViewCell.swift b/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/DateCollectionViewCell.swift index 55326ff..5e29648 100644 --- a/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/DateCollectionViewCell.swift +++ b/HMH_iOS/HMH_iOS/Presentation/Challenge/Cells/DateCollectionViewCell.swift @@ -21,7 +21,7 @@ class DateCollectionViewCell: UICollectionViewCell { let imageView = UIImageView().then { $0.backgroundColor = .background - $0.makeCornerRound(radius: 8) + $0.makeCornerRound(radius: 8.adjusted) } override init(frame: CGRect) { @@ -48,9 +48,9 @@ class DateCollectionViewCell: UICollectionViewCell { } imageView.snp.makeConstraints { - $0.top.equalTo(dateLabel.snp.bottom).offset(6) + $0.top.equalTo(dateLabel.snp.bottom).offset(6.adjustedHeight) $0.centerX.equalToSuperview() - $0.size.equalTo(40) + $0.size.equalTo(40.adjusted) } } diff --git a/HMH_iOS/HMH_iOS/Presentation/Challenge/Views/ChallengeView.swift b/HMH_iOS/HMH_iOS/Presentation/Challenge/Views/ChallengeView.swift index 5a46070..2d444ac 100644 --- a/HMH_iOS/HMH_iOS/Presentation/Challenge/Views/ChallengeView.swift +++ b/HMH_iOS/HMH_iOS/Presentation/Challenge/Views/ChallengeView.swift @@ -126,12 +126,12 @@ extension ChallengeView: UICollectionViewDataSource { extension ChallengeView { func createDateLayout() -> NSCollectionLayoutSection { - let itemSize = NSCollectionLayoutSize(widthDimension: .absolute(40), - heightDimension: .absolute(63)) + let itemSize = NSCollectionLayoutSize(widthDimension: .absolute(40.adjustedWidth), + heightDimension: .absolute(63.adjustedHeight)) let item = NSCollectionLayoutItem(layoutSize: itemSize) let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), - heightDimension: .estimated(63)) + heightDimension: .estimated(63.adjustedHeight)) let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, repeatingSubitem: item, count: 7) @@ -140,8 +140,8 @@ extension ChallengeView { let section = NSCollectionLayoutSection(group: group) section.orthogonalScrollingBehavior = .groupPagingCentered - section.interGroupSpacing = 19 - section.contentInsets = .init(top: 0, leading: 0, bottom: 35, trailing:0) + section.interGroupSpacing = 19.adjustedHeight + section.contentInsets = .init(top: 0, leading: 0, bottom: 35.adjustedHeight, trailing:0) let headerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(145.adjustedHeight)) @@ -166,9 +166,9 @@ extension ChallengeView { func createAppListLayout() -> NSCollectionLayoutSection { let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), - heightDimension: .absolute(68)) + heightDimension: .absolute(68.adjustedHeight)) let item = NSCollectionLayoutItem(layoutSize: itemSize) - item.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 20, bottom: 0, trailing: 20) + item.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 20.adjustedWidth, bottom: 0, trailing: 20.adjustedWidth) let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(0.5))