-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 온보딩 화면 구현 #137
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
Merged
Merged
[Feat] 온보딩 화면 구현 #137
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
810c2cd
[Feat] #126 - 3-1. 소셜로그인 후 회원가입 화면(1) 구현
youz2me fa06821
[Feat] #126 CollectionView 구현 중간 커밋
youz2me 64c0b27
[Feat] #126 - CollectionView로 재구현
youz2me 19aed62
[Setting] #126 - 폴더링 수정
youz2me ab34be6
[Chore] #126 - 2025 LCK 참가팀에 맞게 entity 수정
youz2me d8fda92
[Feat] #126 - LCKTeamCollectionViewCell 작성 및 LCKYearCollectionViewCel…
youz2me 0c1609c
[Feat] #126 - 3-2. 회원가입 화면(2) 응원팀 확인 구현
youz2me b634615
[Feat] #126 - 3-3. 회원가입 화면(3) 프로필 등록 구현
youz2me ec4577c
[Feat] #126 - 3-4. 회원가입 화면(4) 약관동의 화면 구현
youz2me 1060818
[Feat] #126 - 3-5. 회원가입 마무리 후, 환영팝업 구현 및 로그인~회원가입 플로우 연결
youz2me File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // | ||
| // DefaultProfileType.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by YOUJIM on 3/20/25. | ||
| // | ||
|
|
||
|
|
||
| import Foundation | ||
|
|
||
| enum DefaultProfileType: String { | ||
| case green = "img_profile_green" | ||
| case blue = "img_profile_blue" | ||
| case purple = "img_profile_purple" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
Wable-iOS/Presentation/Onboarding/Cell/LCKTeamCollectionViewCell.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| // | ||
| // LCKTeamCollectionViewCell.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by YOUJIM on 3/20/25. | ||
| // | ||
|
|
||
|
|
||
| import UIKit | ||
|
|
||
| final class LCKTeamCollectionViewCell: UICollectionViewCell { | ||
|
|
||
| // MARK: - UIComponent | ||
|
|
||
| let teamImageView: UIImageView = UIImageView().then { | ||
| $0.contentMode = .scaleAspectFit | ||
| } | ||
|
|
||
| let teamLabel: UILabel = UILabel().then { | ||
| $0.textAlignment = .center | ||
| $0.font = .pretendard(.body1) | ||
| } | ||
|
|
||
| // MARK: - LifeCycle | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
|
|
||
| setupView() | ||
| setupConstraint() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
| } | ||
|
|
||
| // MARK: - Private Extension | ||
|
|
||
| private extension LCKTeamCollectionViewCell { | ||
| func setupView() { | ||
| layer.cornerRadius = 32.adjustedWidth | ||
| layer.borderWidth = 1 | ||
| layer.borderColor = UIColor.gray300.cgColor | ||
| layer.masksToBounds = true | ||
|
|
||
| contentView.addSubviews(teamLabel, teamImageView) | ||
| } | ||
|
|
||
| func setupConstraint() { | ||
| teamImageView.snp.makeConstraints { | ||
| $0.leading.equalToSuperview().offset(12) | ||
| $0.centerY.equalToSuperview() | ||
| $0.adjustedWidthEqualTo(44) | ||
| $0.adjustedHeightEqualTo(44) | ||
| } | ||
|
|
||
| teamLabel.snp.makeConstraints { | ||
| $0.centerY.equalToSuperview() | ||
| $0.leading.equalTo(teamImageView.snp.trailing).offset(2) | ||
| $0.trailing.equalToSuperview().inset(16) | ||
| } | ||
| } | ||
| } |
51 changes: 51 additions & 0 deletions
51
Wable-iOS/Presentation/Onboarding/Cell/LCKYearCollectionViewCell.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| // | ||
| // LCKYearCollectionViewCell.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by YOUJIM on 3/20/25. | ||
| // | ||
|
|
||
|
|
||
| import UIKit | ||
|
|
||
| final class LCKYearCollectionViewCell: UICollectionViewCell { | ||
|
|
||
| // MARK: - UIComponent | ||
|
|
||
| let yearLabel = UILabel().then { | ||
| $0.attributedText = "\(Calendar.current.component(.year, from: Date()))".pretendardString(with: .body2) | ||
| $0.textColor = .wableBlack | ||
| } | ||
|
|
||
| // MARK: - LifeCycle | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
|
|
||
| setupView() | ||
| setupConstraint() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
| } | ||
|
|
||
| // MARK: - Private Extension | ||
|
|
||
| private extension LCKYearCollectionViewCell { | ||
| func setupView() { | ||
| layer.cornerRadius = 8.adjustedHeight | ||
| clipsToBounds = true | ||
|
|
||
| contentView.addSubview(yearLabel) | ||
| } | ||
|
|
||
| func setupConstraint() { | ||
| yearLabel.snp.makeConstraints { | ||
| $0.centerY.equalToSuperview() | ||
| $0.leading.equalToSuperview().offset(9) | ||
| } | ||
| } | ||
| } | ||
|
|
83 changes: 83 additions & 0 deletions
83
Wable-iOS/Presentation/Onboarding/View/AgreementItemView.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| // | ||
| // AgreementItemView.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by YOUJIM on 3/21/25. | ||
| // | ||
|
|
||
|
|
||
| import UIKit | ||
|
|
||
| final class AgreementItemView: UIView { | ||
|
|
||
| // MARK: - UIComponent | ||
|
|
||
| lazy var checkButton: UIButton = UIButton().then { | ||
| $0.setImage(.btnCheckboxDefault, for: .normal) | ||
| $0.setImage(.btnCheckboxActive, for: .selected) | ||
| } | ||
|
|
||
| let titleLabel: UILabel = UILabel().then { | ||
| $0.textColor = .wableBlack | ||
| $0.font = .pretendard(.body2) | ||
| } | ||
|
|
||
| lazy var infoButton: UIButton = UIButton(configuration: .plain()).then { | ||
| $0.configuration?.attributedTitle = "보러가기".pretendardString(with: .body4).withUnderline() | ||
| $0.configuration?.baseForegroundColor = .gray500 | ||
| $0.configuration?.contentInsets = .init(top: 0, leading: 0, bottom: 0, trailing: 0) | ||
| } | ||
|
|
||
| // MARK: - LifeCycle | ||
|
|
||
| init(title: String, hasInformation: Bool) { | ||
| super.init(frame: .zero) | ||
|
|
||
| setupView(title: title, hasInformation: hasInformation) | ||
| setupConstraint() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
| } | ||
|
|
||
| // MARK: - Private Extension | ||
|
|
||
| private extension AgreementItemView { | ||
|
|
||
| // MARK: - Setup Method | ||
|
|
||
| func setupView(title: String, hasInformation: Bool) { | ||
| addSubviews( | ||
| checkButton, | ||
| titleLabel, | ||
| infoButton | ||
| ) | ||
|
|
||
| titleLabel.text = title | ||
| infoButton.isHidden = !hasInformation | ||
| } | ||
|
|
||
| func setupConstraint() { | ||
| snp.makeConstraints { | ||
| $0.adjustedHeightEqualTo(48) | ||
| } | ||
|
|
||
| titleLabel.snp.makeConstraints { | ||
| $0.leading.equalTo(checkButton.snp.trailing).offset(4) | ||
| $0.centerY.equalTo(checkButton) | ||
| } | ||
|
|
||
| checkButton.snp.makeConstraints { | ||
| $0.top.leading.equalToSuperview() | ||
| $0.size.equalTo(48) | ||
| $0.centerY.equalTo(titleLabel) | ||
| } | ||
|
|
||
| infoButton.snp.makeConstraints { | ||
| $0.leading.equalTo(titleLabel.snp.trailing).offset(6) | ||
| $0.centerY.equalTo(titleLabel) | ||
| } | ||
| } | ||
| } |
118 changes: 118 additions & 0 deletions
118
Wable-iOS/Presentation/Onboarding/View/AgreementView.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| // | ||
| // AgreementView.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by YOUJIM on 3/20/25. | ||
| // | ||
|
|
||
|
|
||
| import UIKit | ||
|
|
||
| import Kingfisher | ||
|
|
||
| final class AgreementView: UIView { | ||
|
|
||
| // MARK: - UIComponent | ||
|
|
||
| private let titleLabel: UILabel = UILabel().then { | ||
| $0.attributedText = "와블 이용을 위해\n동의가 필요해요".pretendardString(with: .head0) | ||
| $0.textColor = .wableBlack | ||
| $0.numberOfLines = 2 | ||
| } | ||
|
|
||
| let allAgreementItemView = AgreementItemView(title: "전체 선택", hasInformation: false) | ||
|
|
||
| private let divideView: UIView = UIView().then { | ||
| $0.backgroundColor = .gray300 | ||
| } | ||
|
|
||
| let personalInfoAgreementItemView = AgreementItemView(title: "[필수] 이용약관 동의", hasInformation: true) | ||
|
|
||
| let privacyPolicyAgreementItemView = AgreementItemView(title: "[필수] 개인정보 수집 및 이용동의", hasInformation: true) | ||
|
|
||
| let ageAgreementItemView = AgreementItemView(title: "[필수] 만 14세 이상입니다", hasInformation: false) | ||
|
|
||
| let marketingAgreementItemView = AgreementItemView(title: "마케팅 활용/광고성 정보 수신 동의", hasInformation: false) | ||
|
|
||
| let nextButton: WableButton = WableButton(style: .gray).then { | ||
| $0.configuration?.attributedTitle = "다음으로".pretendardString(with: .head2) | ||
| $0.isUserInteractionEnabled = false | ||
| } | ||
|
|
||
| // MARK: - LifeCycle | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
|
|
||
| setupView() | ||
| setupConstraint() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
| } | ||
|
|
||
| // MARK: - Private Extension | ||
|
|
||
| private extension AgreementView { | ||
|
|
||
| // MARK: Setup Method | ||
|
|
||
| func setupView() { | ||
| addSubviews( | ||
| titleLabel, | ||
| allAgreementItemView, | ||
| divideView, | ||
| personalInfoAgreementItemView, | ||
| privacyPolicyAgreementItemView, | ||
| ageAgreementItemView, | ||
| marketingAgreementItemView, | ||
| nextButton | ||
| ) | ||
| } | ||
|
|
||
| func setupConstraint() { | ||
| titleLabel.snp.makeConstraints { | ||
| $0.top.equalToSuperview().offset(10) | ||
| $0.leading.equalToSuperview().offset(16) | ||
| } | ||
|
|
||
| allAgreementItemView.snp.makeConstraints { | ||
| $0.top.equalTo(titleLabel.snp.bottom).offset(36) | ||
| $0.horizontalEdges.equalToSuperview().inset(16) | ||
| } | ||
|
|
||
| divideView.snp.makeConstraints { | ||
| $0.top.equalTo(allAgreementItemView.snp.bottom).offset(16) | ||
| $0.horizontalEdges.equalTo(allAgreementItemView).inset(12) | ||
| $0.adjustedHeightEqualTo(1) | ||
| } | ||
|
|
||
| personalInfoAgreementItemView.snp.makeConstraints { | ||
| $0.top.equalTo(divideView.snp.bottom).offset(16) | ||
| $0.horizontalEdges.equalToSuperview().inset(16) | ||
| } | ||
|
|
||
| privacyPolicyAgreementItemView.snp.makeConstraints { | ||
| $0.top.equalTo(personalInfoAgreementItemView.snp.bottom).offset(4) | ||
| $0.horizontalEdges.equalToSuperview().inset(16) | ||
| } | ||
|
|
||
| ageAgreementItemView.snp.makeConstraints { | ||
| $0.top.equalTo(privacyPolicyAgreementItemView.snp.bottom).offset(4) | ||
| $0.horizontalEdges.equalToSuperview().inset(16) | ||
| } | ||
|
|
||
| marketingAgreementItemView.snp.makeConstraints { | ||
| $0.top.equalTo(ageAgreementItemView.snp.bottom).offset(4) | ||
| $0.horizontalEdges.equalToSuperview().inset(16) | ||
| } | ||
|
|
||
| nextButton.snp.makeConstraints { | ||
| $0.bottom.equalTo(safeAreaLayoutGuide).inset(30) | ||
| $0.horizontalEdges.equalToSuperview().inset(16) | ||
| $0.adjustedHeightEqualTo(56) | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메모리 누수의 여지가 보이는데,
weak또는unowned키워드를 사용해야 할 것 같네요!