Skip to content

Conversation

@youz2me
Copy link
Member

@youz2me youz2me commented Mar 20, 2025

👻 PULL REQUEST

📄 작업 내용

  • 온보딩(회원가입 화면, 응원팀 확인 화면, 프로필 등록 화면, 약관 동의 화면, 환영 팝업) UI를 구현했어요.
  • 현재 이미 해당 브랜치에서 ViewModel을 구현중이라 화면 녹화가 불가능합니다 ㅜ 다음 PR에 합쳐서 올리겠습니다!

💻 주요 코드 설명

현재 날짜 기준 LCK 시작 연도 계산

  • Calendar.current.component(.year, from: Date())를 이용해 현재 날짜 기준 연도를 계산하고 LCK 시작 연도인 2012년부터 현재 연도까지 CollectionViewCell에 담기도록 구현했어요.
// MARK: - UICollectionViewDataSource

extension LCKYearViewController: UICollectionViewDataSource {
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return Calendar.current.component(.year, from: Date()) - 2012 + 1
    }
    
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        guard let cell = collectionView.dequeueReusableCell(
            withReuseIdentifier: LCKYearCollectionViewCell.reuseIdentifier,
            for: indexPath
        ) as? LCKYearCollectionViewCell else {
            return UICollectionViewCell()
        }
        
        cell.yearLabel.attributedText = String(2012 + indexPath.row).pretendardString(with:  .body2)
        
        return cell
    }
}

👀 기타 더 이야기해볼 점

  • 현재 모든 기능을 ViewController 내에 구현하고 화면 전환되는 과정만 구현해둔 상태이며, 다음 PR에서 Input-output 패턴을 활용한 MVVM 구조를 구현할 예정입니다.
  • 현재 리뷰를 반영하더라도 뷰모델 작업 내용과 충돌이 발생할 것이 분명해 ... 리뷰를 남겨주시면 다음 PR에서 반영하도록 하겠습니다 🥲

🔗 연결된 이슈

@youz2me youz2me added ✨ feat 기능 또는 객체 구현 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌 labels Mar 20, 2025
@youz2me youz2me requested a review from JinUng41 March 20, 2025 20:07
@youz2me youz2me self-assigned this Mar 20, 2025
Copy link
Collaborator

@JinUng41 JinUng41 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다.

간단한 코멘트만 남겨두었으니, 확인 부탁드려요!

Comment on lines +154 to 160
let navigationController = UINavigationController(rootViewController: LCKYearViewController(type: .flow)).then {
$0.navigationBar.isHidden = true
$0.modalPresentationStyle = .fullScreen
}

self.present(navigationController, animated: true)
}))
Copy link
Collaborator

Choose a reason for hiding this comment

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

메모리 누수의 여지가 보이는데, weak 또는 unowned 키워드를 사용해야 할 것 같네요!

Comment on lines +70 to +74
guard let url = URL(
string: sender == rootView.personalInfoAgreementItemView.infoButton ? "https://joyous-ghost-8c7.notion.site/c6e26919055a4ff98fd73a8f9b29cb36?pvs=4" : "https://joyous-ghost-8c7.notion.site/fff08b005ea18052ae0bf9d056c2e830?pvs=4"
) else {
return
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

링크를 상수화 하는 것도 좋아보이네요.

enum Constant {
    static let tempURL1 = ""
    static let tempURL2 = ""
}

Comment on lines +76 to +81
for cell in collectionView.visibleCells {
guard let cell = cell as? LCKTeamCollectionViewCell else { return }

cell.layer.borderColor = UIColor.gray300.cgColor
cell.teamLabel.textColor = .gray700
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

타입 캐스팅에 따른 조건문에서 만약 실패하여, return을 만났을 경우를 생각해 보면 좋을 것 같습니다.
왜냐면 return을 만났을 때, 실행하고 있는 메서드를 종료시키고 제어권을 반환하기 때문이죠.

반복문을 스킵하고 싶다면, continue가 맞을 것 같네요!

@youz2me youz2me merged commit 5430e4a into develop Mar 22, 2025
youz2me added a commit that referenced this pull request Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 기능 또는 객체 구현 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 온보딩 화면 구현

3 participants