-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature] 영화 리스트(메인화면) 구현 및 검색 UI 구현 #16
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3510c2c
[feat] 영화 리스트 UI 구현
minneee d0b6667
[feat] 검색 UI 구현
minneee ec3e9e4
[feat] 데이터 파싱 구현
minneee 7665847
[feat] 영화 리스트 UI 구현
minneee db74bb8
[feat] 검색 UI 구현
minneee 1cf34f7
[feat] 데이터 파싱 구현
minneee c989ba5
[feat] api 연결
minneee 6f5269f
[chore]origin pull
minneee 21a5d52
[feat] 네트워크 에러처리
minneee 96122ca
[feat] 스크롤 버튼 동작 추가
minneee 9289a18
[chore] MovieDataSource에서 enum 분리
minneee c7e7b77
[chore] 접근제어자 추가
minneee 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
14 changes: 7 additions & 7 deletions
14
MovieBooking.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // | ||
| // MovieListResponseDTO.swift | ||
| // MovieBooking | ||
| // | ||
| // Created by 김민희 on 10/15/25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| struct MovieListResponseDTO: Decodable { | ||
| let page: Int | ||
| let results: [MovieDTO] | ||
| let totalPages: Int | ||
| let totalResults: Int | ||
| let dates: DatesDTO? | ||
| } | ||
|
|
||
| struct MovieDTO: Decodable { | ||
| let id: Int | ||
| let title: String | ||
| let overview: String | ||
| let posterPath: String? | ||
| let releaseDate: String | ||
| let voteAverage: Double | ||
| } | ||
|
|
||
| struct DatesDTO: Decodable { | ||
| let maximum: String | ||
| let minimum: String | ||
| } | ||
|
|
||
| extension MovieDTO { | ||
| func toDomain() -> Movie { | ||
| Movie( | ||
| id: id, | ||
| title: title, | ||
| overview: overview, | ||
| posterPath: posterPath ?? "", | ||
| releaseDate: releaseDate, | ||
| voteAverage: voteAverage | ||
| ) | ||
| } | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // | ||
| // MockMovieRepository.swift | ||
| // MovieBooking | ||
| // | ||
| // Created by 김민희 on 10/15/25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| struct MockMovieRepository: MovieRepositoryProtocol { | ||
| func fetchUpcomingMovies() async throws -> [Movie] { | ||
| return Movie.mockData | ||
| } | ||
|
|
||
| func fetchPopularMovies() async throws -> [Movie] { | ||
| return Movie.mockData | ||
| } | ||
|
|
||
| func fetchNowPlayingMovies() async throws -> [Movie] { | ||
| try await Task.sleep(for: .seconds(1)) | ||
| return Movie.mockData | ||
| } | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // | ||
| // MovieCategory.swift | ||
| // MovieBooking | ||
| // | ||
| // Created by 김민희 on 10/17/25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| enum MovieCategory: String { | ||
| case popular | ||
| case nowPlaying = "now_playing" | ||
| case topRated = "top_rated" | ||
| case upcoming | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // | ||
| // MovieTarget.swift | ||
| // MovieBooking | ||
| // | ||
| // Created by 김민희 on 10/17/25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| enum MovieTarget { | ||
| case movieDetail(id: String) | ||
| case movieList(category: MovieCategory, page: Int = 1) | ||
| } |
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
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
46 changes: 46 additions & 0 deletions
46
MovieBooking/Feature/MovieList/Components/CircularArrowButton.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // | ||
| // CircularArrowButton.swift | ||
| // MovieBooking | ||
| // | ||
| // Created by 김민희 on 10/14/25. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| enum ArrowDirection { | ||
| case left | ||
| case right | ||
| } | ||
|
|
||
| struct CircularArrowButton: View { | ||
| private let direction: ArrowDirection | ||
| private let action: () -> Void | ||
|
|
||
| init(direction: ArrowDirection, action: @escaping () -> Void) { | ||
| self.direction = direction | ||
| self.action = action | ||
| } | ||
|
|
||
| private var systemImageName: String { | ||
| switch self.direction { | ||
| case .left: | ||
| return "chevron.left" | ||
| case .right: | ||
| return "chevron.right" | ||
| } | ||
| } | ||
|
|
||
| var body: some View { | ||
| Button(action: action) { | ||
| ZStack { | ||
| Circle() | ||
| .stroke(.gray.opacity(0.4), lineWidth: 1) | ||
|
|
||
| Image(systemName: systemImageName) | ||
| .font(.system(size: 10, weight: .semibold)) | ||
| .foregroundStyle(.black) | ||
| } | ||
| .frame(width: 30, height: 30) | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
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.
오 좋은데요 ? repository도 해보고싶었는데 단일 레포라 가능하겠네요