검색 UI 추가

This commit is contained in:
Yu Sung
2025-03-27 08:54:08 +09:00
parent 82dc43b40f
commit c71e78fc88
16 changed files with 1023 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ struct ContentMainView: View {
.padding(.horizontal, 13.3)
.onTapGesture {
UserDefaults.set("", forKey: .searchChannel)
AppState.shared.setAppStep(step: .searchChannel)
AppState.shared.setAppStep(step: .search)
}
ContentMainCreatorRankingView()

View File

@@ -81,7 +81,7 @@ struct ContentMainTabHomeView: View {
.padding(.horizontal, 13.3)
.onTapGesture {
UserDefaults.set("", forKey: .searchChannel)
AppState.shared.setAppStep(step: .searchChannel)
AppState.shared.setAppStep(step: .search)
}
VStack(spacing: 13.3) {

View File

@@ -10,6 +10,7 @@ import Kingfisher
struct SeriesDetailView: View {
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
@ObservedObject var viewModel = SeriesDetailViewModel()
let seriesId: Int
@@ -35,7 +36,13 @@ struct SeriesDetailView: View {
Image("ic_back")
.resizable()
.frame(width: 20, height: 20)
.onTapGesture { AppState.shared.back() }
.onTapGesture {
if presentationMode.wrappedValue.isPresented {
presentationMode.wrappedValue.dismiss()
} else {
AppState.shared.back()
}
}
Spacer()
}
@@ -232,6 +239,8 @@ struct SeriesDetailView: View {
}
}
}
.navigationTitle("")
.navigationBarBackButtonHidden()
}
.onAppear {
viewModel.seriesId = seriesId