Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat [#29] 나의 챌린지 뷰 Footer Button 완성 #32

Merged
merged 8 commits into from
Jan 8, 2024

Conversation

Zoe0929
Copy link
Member

@Zoe0929 Zoe0929 commented Jan 8, 2024

👾 작업 내용

  • FooterView 버튼을 구현했습니다.

🚀 PR Point

  • 기기 대응시, 가운데 정렬이 안되는 에러를 발견하여 다음과 같이 해결했습니다.
  1. enviroment를 이용하여 collectionView content의 너비를 계산합니다.
environment.container.contentSize.width 
  1. group의 크기를 제외한 너비의 절반을 inset으로 설정합니다.
 let groupInset = (environment.container.contentSize.width - 322) / 2
group.contentInsets = .init(top: 0, leading: groupInset, bottom: 0, trailing: groupInset)
  1. 이 과정때문에, 기존 섹션 별로 구분되어 있던 Layout 함수를 하나로 통합했습니다.
  • Background를 적용할 때, safeArea가 채워지지 않는 문제를 발견했습니다. -로 offset을 주어 그 부분을 채웠습니다.
$0.top.equalToSuperview().offset(-200)
  • FooterButton은 SwiftUI로 제작되었습니다. 터치 영역은 추후 수정 예정입니다.

📸 스크린샷

구현 내용 스크린샷
나의 챌린지 뷰 Footer 완성 Simulator Screen Recording - iPhone 13 mini - 2024-01-09 at 01 33 26

🖥️ 기기대응

기기 아이폰 13Mini 아이폰 14 아이폰 15Pro 아이폰 SE3세대
스크린샷 Simulator Screenshot - iPhone 13 mini - 2024-01-09 at 01 32 53 Simulator Screenshot - iPhone 14 - 2024-01-09 at 01 32 54 Simulator Screenshot - iPhone 15 Pro - 2024-01-09 at 01 32 53 Simulator Screenshot - iPhone SE (3rd generation) - 2024-01-09 at 01 32 52

✅ Issue

Resolved #29

@Zoe0929 Zoe0929 added 🐰지희 지희의 issue 🌈 feat 기능 구현 labels Jan 8, 2024
@Zoe0929 Zoe0929 added this to the 🚀1차 스프린트🚀 milestone Jan 8, 2024
@Zoe0929 Zoe0929 self-assigned this Jan 8, 2024
@Zoe0929 Zoe0929 linked an issue Jan 8, 2024 that may be closed by this pull request
Copy link
Member

@kim-seonwoo kim-seonwoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

구현 너무 고생 많으셨습니다~😎

private func setConstraints() {
contentViewController.view.snp.makeConstraints {
$0.verticalEdges.equalToSuperview()
$0.horizontalEdges.equalToSuperview().inset(20)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5. 혹시 adjusted 에러가 발생 할 까요?

section.contentInsets = .init(top: 0, leading: 0, bottom: 35, trailing:0)


let headerHeight = UIScreen().isLongerThan812pt ? 145 : 165
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5. 분기 한 이후에는 adjusted 사용 하는게 나을까용?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CompositionalLayout 안에서는 adjusted를 사용하면 레이아웃 에러가 발생합니다.

@Zoe0929 Zoe0929 changed the title Feat/#29 challeng view footer Feat [#29] 나의 챌린지 뷰 Footer Button 완성 Jan 8, 2024
Copy link
Contributor

@boyeon0119 boyeon0119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아주 나이스합니다~

@Zoe0929 Zoe0929 merged commit 098bc51 into develop Jan 8, 2024
@Zoe0929 Zoe0929 deleted the feat/#29-ChallengView-Footer branch January 9, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌈 feat 기능 구현 🐰지희 지희의 issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feat] ChallengeView Footer 제작
3 participants