Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 70 additions & 2 deletions Wable-iOS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions Wable-iOS/Domain/Enum/LCKTeam.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import Foundation
// MARK: - 2025년 LCK 팀 목록

enum LCKTeam: String {
case lck = "LCK"
case t1 = "T1"
case gen = "GEN"
case hle = "HLE"
case dk = "DK"
case kt = "KT"
case fox = "FOX"
case kdf = "KDF"
case ns = "NS"
case drx = "DRX"
case bro = "BRO"
case bfx = "BFX"
case dnf = "DNF"
}
15 changes: 15 additions & 0 deletions Wable-iOS/Presentation/Enum/DefaultProfileType.swift
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"
}
7 changes: 6 additions & 1 deletion Wable-iOS/Presentation/Login/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ private extension LoginViewController {
)

noticeViewController.addAction(.init(title: "확인", style: .primary, handler: {
// TODO: 온보딩 화면으로 전환 필요
let navigationController = UINavigationController(rootViewController: LCKYearViewController(type: .flow)).then {
$0.navigationBar.isHidden = true
$0.modalPresentationStyle = .fullScreen
}

self.present(navigationController, animated: true)
}))
Comment on lines +154 to 160
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 키워드를 사용해야 할 것 같네요!


self.present(noticeViewController, animated: true)
Expand Down
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)
}
}
}
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 Wable-iOS/Presentation/Onboarding/View/AgreementItemView.swift
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 Wable-iOS/Presentation/Onboarding/View/AgreementView.swift
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)
}
}
}
Loading