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 [#19] 나의 챌린지 뷰 UI 구현 #25

Merged
merged 23 commits into from
Jan 8, 2024
Merged

Conversation

Zoe0929
Copy link
Member

@Zoe0929 Zoe0929 commented Jan 6, 2024

👾 작업 내용

"나의 챌린지 뷰" UI를 구현했습니다.

  • 아직 완벽한 구현은 아니며, 추후 수정할 예정입니다.
  • PR 단위를 축소하기 위해 PR 올립니다.

🚀 PR Point

  • Compositional Layout을 사용하여 구현했습니다.
  • NsCollectionViewLayoutSection을 만들 때, adjusted를 사용하면 오히려 레이아웃이 깨지는 현상을 발견하여 , 그 부분에 한하여 사용하지 않았습니다.
  • 서버 통신 전 더미 데이터를 넣어 테스트 하기 위해 아래와 같은 Model을 만들었습니다
struct AppModel {
    let appIcon: String
    let appName: String
    let appUseTime: String
}
  • App 추가 버튼은 추후 SectionFooter로 구현 할 예정입니다.
  • NavigationBar를 우선 ViewController에 포함시켜뒀는데, 이럴 경우 스크롤을 해도 NavigationBar는 고정되어, 현재는 애니메이션을 이용해서 스크롤 시 사라지게 해두었습니다. 더 좋은 방법이 있다면 이야기해주세요.
// ChallengeViewController
extension ChallengeViewController: UIScrollViewDelegate {
    
    func scrollViewWillBeginDecelerating(_ scrollView: UIScrollView) {
        if scrollView.panGestureRecognizer.translation(in: scrollView).y < 0 {
            UIView.animate(withDuration: 0.3, animations: {
                self.navigationBar.alpha = 0
            })
        } else {
            UIView.animate(withDuration: 0.3, animations: {
                self.navigationBar.alpha = 1
            })
        }
    }
}
  • 네비게이션 바는 내부에 Height을 지정해주는 것이 추후 재사용 시 편리할 것 같습니다. 수정 부탁드립니다. @kim-seonwoo
self.snp.makeConstraints {
         $0.height.equalTo(63.adjustedHeight)
      }
}

📸 스크린샷

구현 내용 스크린샷
7일 챌린지
14일 챌린지
기기 대응 스크린샷 2024-01-07 오전 6 19 49
스크롤 시 Simulator Screen Recording - iPhone 15 Pro - 2024-01-07 at 06 21 16

✅ Issue

Resolved #19

@Zoe0929 Zoe0929 added 🐰지희 지희의 issue 🌈 feat 기능 구현 labels Jan 6, 2024
@Zoe0929 Zoe0929 added this to the 🚀1차 스프린트🚀 milestone Jan 6, 2024
@Zoe0929 Zoe0929 self-assigned this Jan 6, 2024
@Zoe0929 Zoe0929 linked an issue Jan 6, 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.

p3. 벌써 뷰가 만들어진 것 같습니다.. 역시! 수고하셨습니다😎

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.

너무 길어요,, 너무 고생하셧어요 ㅠㅠㅠ 제발 자세요 ㅠㅠㅠ 👍

static let identifer = "DateCollectionViewCell"

let dateLabel = UILabel().then {
$0.text = "1"
Copy link
Contributor

Choose a reason for hiding this comment

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

p5. 까먹지 않기!

@Zoe0929 Zoe0929 merged commit 8670a97 into develop Jan 8, 2024
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] 챌린지 뷰 상단 UI 구현
3 participants