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 [#31] 마이페이지 구현 #43

Merged
merged 27 commits into from
Jan 9, 2024
Merged

Conversation

boyeon0119
Copy link
Contributor

👾 작업 내용

  • 마이페이지 UI 구현 완성하였습니다. 아직 로그아웃, 회원탈퇴 그리고 웹뷰 연결은 안했어요.

🚀 PR Point

유저 더미 데이터 연결

  • 유저 이름과 포인트 더미데이터를 만들었습니다.
struct UserModel {
    let userName: String
    let point: Int
}

extension UserModel {
    static func dummy() -> UserModel {
        return UserModel(userName: "여민서", point: 3000)
    }
}
  • 그리고 bindData()를 통해 다음과 같이 연결시켰습니다.
extension UserPointHeaderView {
    func bindData(model: UserModel) {
        let numberFormatter: NumberFormatter = NumberFormatter()
        numberFormatter.numberStyle = .decimal
        let userPoint: String = numberFormatter.string(for: model.point) ?? "0"
        self.userLabel.text = model.userName
        self.countPointLabel.text = "\(userPoint)"
    }
}
case 0:
            if kind == UICollectionView.elementKindSectionHeader {
                guard let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: UserPointHeaderView.identifier, for: indexPath) as? UserPointHeaderView else {
                    return UICollectionReusableView()
                }
                **headerView.bindData(model: UserModel.dummy())**
                return headerView
            }

공통 Cell 재사용

  • 공통 셀을 만들어 '지금까지의 여정', '상점', '이용약관', '개인정보처리방침' 4개의 셀을 만들었습니다.
  • '이용약관'과 '개인정보처리방침'에서는 아이콘 이미지의 값을 nil로 줘서 title만 뜨게 했습니다.
case 2:
            if indexPath.item == 0 {
                item.configureCell(iconImage: nil, labelText: StringLiteral.myPage.TOS, labelColor: .whiteText)
            } else if indexPath.item == 1 {
                item.configureCell(iconImage: nil, labelText: StringLiteral.myPage.privacyPolicy, labelColor: .whiteText)
            }
            return item

아직 화면 연결은 하지 못했습니다....

📸 스크린샷

구현 내용 스크린샷
마이페이지

🚀 기기 대응

기기명 Iphone 13 mini Iphone 14 Iphone 15 pro Iphone SE(3rd)
스크린샷

✅ Issue

Resolved #31

@boyeon0119 boyeon0119 added 🙊보연 보연의 issue 🌈 feat 기능 구현 🎨 style 커스텀 뷰 짜기 labels Jan 9, 2024
@boyeon0119 boyeon0119 added this to the 🚀1차 스프린트🚀 milestone Jan 9, 2024
@boyeon0119 boyeon0119 self-assigned this Jan 9, 2024
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.

오 상당히 빠릅니다... 완성.. 수고하셨어요!

Copy link
Member

@Zoe0929 Zoe0929 left a comment

Choose a reason for hiding this comment

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

LGTM ~

@boyeon0119 boyeon0119 merged commit cfd54da into develop Jan 9, 2024
@boyeon0119 boyeon0119 changed the title Feat[#31] 마이페이지 구현 Feat [#31] 마이페이지 구현 Jan 12, 2024
@Zoe0929 Zoe0929 deleted the feat/31-myPageViewUI branch June 12, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌈 feat 기능 구현 🎨 style 커스텀 뷰 짜기 🙊보연 보연의 issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feat] 마이페이지 구현
3 participants