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

은행 창구 관리 앱 [STEP 4] Jane, Sajae #98

Open
wants to merge 31 commits into
base: d_Sajae
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
134cd64
config: Main 스토리보드 삭제 및 루트 뷰 설정
jane1choi Feb 6, 2024
bdbc81c
feat: Then 프로토콜 정의
jane1choi Feb 7, 2024
ce7ba43
feat: UIStackView extension 추가
jane1choi Feb 7, 2024
d6781fd
feat: BankViewController 기본 UI 구성
jane1choi Feb 7, 2024
2fdd92b
chore: 시작 뷰컨트롤러 변경
jane1choi Feb 7, 2024
b507518
chore: ViewController 파일 이름 수정
jane1choi Feb 7, 2024
b25f624
feat: Client 모델 추가
suojae Feb 7, 2024
72e834b
feat: BankTask 모델 추가
suojae Feb 7, 2024
d1ced4c
feat: ViewModel 프로토콜 정의
jane1choi Feb 7, 2024
b4b5466
feat: UITableViewCell+ 파일 추가
jane1choi Feb 8, 2024
673aa24
feat: 커스텀 tableViewCell 정의
jane1choi Feb 8, 2024
c547859
feat: 더미데이터를 활용한 테이블 뷰 UI 구성
jane1choi Feb 8, 2024
33b3c4d
feat: TimerHandler 추가
suojae Feb 8, 2024
ddadc9f
chore: TimeUnit 구조체 추가 및 적용
suojae Feb 8, 2024
b60a853
config: 프로젝트 파일 폴더링
jane1choi Feb 8, 2024
e9686ad
feat: Observable 타입 정의
jane1choi Feb 8, 2024
9b1cdd9
feat: BankRepository 정의
jane1choi Feb 8, 2024
ab84765
feat: BankViewModel 추가 및 폴더링
jane1choi Feb 8, 2024
90b816d
feat: 고객 10명 추가 기능 구현
jane1choi Feb 8, 2024
f614f29
feat: 의존성 주입 코드 추가
jane1choi Feb 8, 2024
f6e4a0e
chore: BankTimer 네이밍 변경
suojae Feb 8, 2024
965cd93
chore: Observable 이용한 Timer 데이터 바인딩
suojae Feb 8, 2024
f4fb31f
feat: reset버튼 액션 추가
suojae Feb 8, 2024
e3af0ee
chore: 변수명에서 get 제거
suojae Feb 8, 2024
bb1d7fa
feat: 셀 재사용에 대비한 초기화 및 UI 설정 코드 추가
jane1choi Feb 8, 2024
41c2dd3
feat: 은행 업무 처리 기능 구현
jane1choi Feb 9, 2024
2e69567
fix: 순환 참조 문제 해결
jane1choi Feb 9, 2024
af19f16
chore: life cycle 코드 위치 수정 및 마크 구문 추가
jane1choi Feb 9, 2024
57066b4
chore: 메서드 네이밍 수정
jane1choi Feb 9, 2024
942a16b
feat: 업무중 테이블 뷰 UI 연결 및 마크 구문 추가
jane1choi Feb 9, 2024
27084bc
chore: 자잘한 코드 수정
jane1choi Feb 9, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ final class BankTimer {

private var timer = Timer()
private var count = 0
var getTimeString: ((String) -> Void)?
var timeString: ((String) -> Void)?
Copy link

Choose a reason for hiding this comment

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

delegate패턴으로 바꾼다면 어떤식으로 바뀔까요 ?


func start() {
timer = Timer.scheduledTimer(timeInterval: 0.001, target: self, selector: #selector(timerCounter), userInfo: nil, repeats: true)
}

func stop() {
timer.invalidate()
getTimeString?("00:00:00")
timeString?("00:00:00")
}

@objc private func timerCounter() {
count += 1
let time = secondsToHoursMinutesSeconds(seconds: count)
var convertedTimeString = makeTimeString(time)
getTimeString?(convertedTimeString)
timeString?(convertedTimeString)
}

private func secondsToHoursMinutesSeconds(seconds: Int) -> TimeUnit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class BankViewModel {
}

func fetchTimeString() {
timer.getTimeString = {
Copy link

Choose a reason for hiding this comment

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

timeString 이란 이름도 조금 모호한 것 같아요 !

timer.timeString = {
self.timeString.value = $0
}
}
Expand Down