-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Refactor] Observable 적용 + 피드백 반영 #33
Open
yurim830
wants to merge
10
commits into
main
Choose a base branch
from
refactor/Observable
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ff027a1
[Add, Feat] #32 - Observable 생성
yurim830 ad69b5a
[Rename] #32 - Observable -> ObservablePattern
yurim830 bbed871
[Rename] #32 - LoginStatus -> LoginModel
yurim830 aa74917
[Refactor] #32 - LoginStatus 타입 변경 class -> struct
yurim830 1cbbd9c
[Add, Refactor] #32 - LoginDTO가 서버 통신에만 사용되도록 LoginInfo 생성
yurim830 2184f9c
[Refactor] #32 - VM이 VC 직접참조하는 것 삭제
yurim830 e495121
[Refactor] #32 - 뷰 바인딩 개선(Observable 활용)
yurim830 c848de0
[Fix] #32 - setSavedInfo 호출
yurim830 e91e9fe
[Chore] #32 - setSavedInfo 메서드 수정
yurim830 d0676fc
[Refactor] #32 - TextField 캡슐화
yurim830 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
This file contains 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 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 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,29 @@ | ||
// | ||
// Observable.swift | ||
// 35-seminar | ||
// | ||
// Created by 김유림 on 1/1/25. | ||
// | ||
|
||
import Foundation | ||
|
||
final class ObservablePattern<T: Equatable> { | ||
|
||
var value: T? { | ||
didSet { | ||
self.listener?(value) | ||
} | ||
} | ||
|
||
init(_ value: T?) { | ||
self.value = value | ||
} | ||
|
||
private var listener: ((T?) -> Void)? | ||
|
||
func bind(_ listener: @escaping (T?) -> Void) { | ||
listener(value) | ||
self.listener = listener | ||
} | ||
|
||
} |
This file contains 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 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 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 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
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.
전 리뷰를 적용한다면, 여기서 그냥 let password = loginView.passwordTextField.text으로 접근해주면 돼용