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

[3주차] 기본과제 구현 #9

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
99b9d7a
[Feat] ButtonBuilder패턴 생성 (+도무지 빌더패턴 왜쓰는지 모르겠음) #8
meltsplit Apr 22, 2023
98093a1
[Chore] 오타수정 #8
meltsplit Apr 22, 2023
f12c682
[Feat] 순환LinkedList 통해 문자열 전환 기능 구현 #8
meltsplit Apr 22, 2023
4d3a5d0
[Feat] Node에 prev 추가 #8
meltsplit Apr 23, 2023
332c4ec
[Chore] Font, Color Extension 변수 및 메소드 class -> static 으로 변경 #8
meltsplit Apr 23, 2023
4f5cc4b
[Chore] 폴더링 및 코드 일부 수정 #8
meltsplit Apr 27, 2023
c3a085f
[Add] 이메일 정규식 추가 #10
meltsplit Apr 27, 2023
5e188ff
[Add] Observer 패턴 추가 #10
meltsplit Apr 27, 2023
0c06cd7
[Refactor] MVVM 패턴으로 이메일 형식, 비밀번호 형식 유효할때 로그인버튼 활성화 #10
meltsplit Apr 27, 2023
04297b6
[Feat] email, password 값에 따른 에러 핸들링 구현 #10
meltsplit Apr 27, 2023
b665a3d
[Chore] AuthTextField 클로저 -> authDelegate 방식으로 변경 #10
meltsplit Apr 27, 2023
1a6df01
[Chore] Error 메세지 AuthError enum 내부 프로퍼티로 선언 #10
meltsplit Apr 27, 2023
104ca3b
[Feat] TextField Return 버튼 누를시 UX 개선 #10
meltsplit Apr 27, 2023
7340e32
[Conflict] 파일복구 #8
meltsplit Apr 28, 2023
865df23
[Conflict] 파일복구2 복붙하기 #8
meltsplit Apr 28, 2023
0b08662
[Feat] 헤더뷰 구현 #8
meltsplit Apr 28, 2023
d532961
[Feat] 마이페이지 UI구현 #8
meltsplit Apr 28, 2023
3d0336b
[Chore] 주석 제거 및 코드 수정 #8
meltsplit Apr 28, 2023
43a2fa7
[Git] gitignore 수정 및 프로젝트 파일 추가 #8
meltsplit May 3, 2023
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ iOSInjectionProject/
### SwiftPackageManager ###
Packages
xcuserdata
*.xcodeproj
# *.xcodeproj


### Xcode ###

## Xcode 8 and earlier

### Xcode Patch ###
*.xcodeproj/*
# *.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
Expand Down
685 changes: 685 additions & 0 deletions SOPTving/SOPTving.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions SOPTving/SOPTving/Application/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<array>
<string>Pretendard-Medium.otf</string>
<string>Pretendard-SemiBold.otf</string>
<string>Pretendard-Bold.otf</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
Expand Down
4 changes: 3 additions & 1 deletion SOPTving/SOPTving/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
window?.rootViewController = OnboardingVC()
let navigationController = UINavigationController(rootViewController: OnboardingVC())
navigationController.setNavigationBarHidden(true, animated: true)
window?.rootViewController = navigationController
window?.makeKeyAndVisible()
}

Expand Down
45 changes: 45 additions & 0 deletions SOPTving/SOPTving/Domain/Entity/MyProfile.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// UserProfile.swift
// SOPTving
//
// Created by 장석우 on 2023/04/28.
//

import Foundation


struct MemberShip {

enum MemberShipType: String {
case basic = "베이직"
case standatd = "스탠다드"
case premium = "프리미엄"
}

enum Period: String {
case annual = "연간"
case monthly = "월간"
}

var type: MemberShipType
var period: Period
}


struct MyProfile {
var name: String
var imageURL: String
var memberShip: MemberShip
var cash: Int
}

extension MyProfile {
static func dummyData() -> MyProfile {
let data = MyProfile(name: "장석우",
imageURL: "profile_tving.cute",
memberShip: MemberShip(type: .standatd,
period: .annual),
cash: 0)
return data
}
}
33 changes: 33 additions & 0 deletions SOPTving/SOPTving/Domain/Entity/Setting.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// Setting.swift
// SOPTving
//
// Created by 장석우 on 2023/04/29.
//

import Foundation



struct MyPageSetting {

enum UserSetting: String, CaseIterable {
case memberShip = "이용권"
case inquiryDetails = "1:1 문의내역"
case reservation = "예약알림"
case changeUserInfo = "회원정보수정"
case acceptMessages = "프로모션정보수신동의"
}

enum AppSetting: String, CaseIterable {
case notice = "공지사항"
case event = "이벤트"
case serviceCenter = "고객센터"
case more = "티빙 알아보기"
}

var userSetting = UserSetting.allCases.map { $0.rawValue }
var appSetting = AppSetting.allCases.map { $0.rawValue }
}


26 changes: 14 additions & 12 deletions SOPTving/SOPTving/Presentation/AuthScene/View/AuthTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ import UIKit
import SnapKit
import Then

protocol AuthTextFieldDelegate: AnyObject {
func authTextFieldTextDidChange(_ textFieldType: AuthTextField.TextFieldType, text: String)
func authTextFieldDidReturn(_ textFieldType: AuthTextField.TextFieldType)
}

final class AuthTextField : UITextField {

//MARK: - Properties

typealias handler = (() -> Void)
private var updateHandler: handler?

enum TextFieldType {
case id
case email
case password

var isSecureTextEntry: Bool {
switch self {
case .id: return false
case .email: return false
case .password: return true
}
}
Expand All @@ -34,7 +37,9 @@ final class AuthTextField : UITextField {
case hideButton
}

private var textFieldType: TextFieldType = .id
private var textFieldType: TextFieldType
weak var authDelegate: AuthTextFieldDelegate?


//MARK: - UI Components

Expand Down Expand Up @@ -71,7 +76,7 @@ final class AuthTextField : UITextField {

//MARK: - Life Cycle

init(viewType: TextFieldType = .id) {
init(viewType: TextFieldType = .email) {
self.textFieldType = viewType
super.init(frame: .zero)

Expand Down Expand Up @@ -127,10 +132,6 @@ final class AuthTextField : UITextField {
}
}

public func setUpdateHandler(updateHandler: @escaping handler) {
self.updateHandler = updateHandler
}

//MARK: - Action Method

@objc
Expand All @@ -154,7 +155,7 @@ extension AuthTextField: UITextFieldDelegate {
}

func textFieldShouldReturn(_ textField: UITextField) -> Bool {
endEditing(true)
authDelegate?.authTextFieldDidReturn(textFieldType)
return true
}

Expand All @@ -163,8 +164,9 @@ extension AuthTextField: UITextFieldDelegate {
}

func textFieldDidChangeSelection(_ textField: UITextField) {
guard let text = textField.text else { return}
updateClearButtonUI()
updateHandler?()
authDelegate?.authTextFieldTextDidChange(textFieldType, text: text)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ final class OnboardingVC: UIViewController {

//MARK: - Properties


//MARK: - UI Components

private let onboardingImageView: UIImageView = {
Expand All @@ -33,7 +34,7 @@ final class OnboardingVC: UIViewController {


//MARK: - Life Cycle

override func viewDidLoad() {
super.viewDidLoad()

Expand All @@ -54,11 +55,11 @@ extension OnboardingVC {

@objc
private func startButtonDidTap() {
// let signInSelectVC = SignInSelectVC()
// present(signInSelectVC, animated: true)
// let signInVC = SignInVC(viewModel: DefaultSignInViewModel(email: "", password: ""))
// present(signInVC, animated: true)

let signInVC = SignInVC()
present(signInVC, animated: true)
let myPageVC = MyPageVC(viewModel: DefaultMyPageViewModel(profileData: MyProfile.dummyData()))
navigationController?.pushViewController(myPageVC, animated: true)
}
}

Expand Down
Loading