Open
Conversation
y-eonee
approved these changes
Dec 18, 2025
Comment on lines
+20
to
+22
| struct DailyBoxOffice: Decodable { | ||
| let rnum: String // 순번 | ||
| let rank: String // 순위 |
Member
There was a problem hiding this comment.
꿀팁: cmd + a -> cmd + i 하면 줄바꿈됩니다
Comment on lines
+42
to
+56
| output.boxOfficeList | ||
| .sink { [weak self] list in | ||
| self?.boxOfficeList = list | ||
| self?.contentView.movieTableView.reloadData() | ||
| } | ||
| .store(in: &cancellables) | ||
|
|
||
| output.isLoading | ||
| .sink { [weak self] isLoading in | ||
| self?.contentView.setLoading(isLoading) | ||
| } | ||
| .store(in: &cancellables) | ||
|
|
||
| contentView.onTapInquiry = { [weak self] date in | ||
| self?.inquiryButtonTappedSubject.send(date) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🍎 iOS Pull request
🏓 구현 내용
datePicker
일별 박스오피스 API를 활용했기 때문에 DatePicker를 활용하여 날짜를 선택하고, 해당 날짜에 맞는 박스오피스 데이터를 조회할 수 있게 했습니다.
Input/Output 패턴
Input
inquiryButtonTapped: 조회 버튼 탭 이벤트와 선택된 Date 전달Output
boxOfficeList: API 응답으로 받은 박스오피스 영화 목록isLoading: API 호출 중 로딩 상태Input/Output 패턴을 사용하여 View에서 발생한 이벤트와 ViewModel에서 관리하는 상태를 명확히 분리했습니다.
transform함수map: API 요청 형식에 맞게 문자열을 변환flatMap: 비동기 API 호출처리sink: 결과 받아서 로딩 종료 및 데이터 전달처음에는
sink안에서 또sink를 사용하니 중첩 구조가 복잡했는데,flatMap을 활용하여 비동기 데이터 흐름을 깔끔하게 처리했습니다.📸 스크린샷
☠️ 어려웠던 점
벌써 스터디 막바지네요 ㄷㄷ
모두 고생 많으셨습니다~~