Skip to content

Commit 3863287

Browse files
committed
[#477] PaperListView ScrollView to List
1 parent bb4ea77 commit 3863287

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

Presentation/Home/HomeSearch/Cell/HomePDFCell.swift

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct HomePDFCell: View {
2222

2323

2424
var body: some View {
25+
VStack(spacing: 0) {
2526
Button {
2627
onTapGesture()
2728
} label: {
@@ -60,6 +61,11 @@ struct HomePDFCell: View {
6061
.padding(.top, 10)
6162
}
6263
.frame(height: 138)
64+
65+
Rectangle()
66+
.foregroundStyle(.primary3)
67+
.frame(height: 1)
68+
}
6369
}
6470
}
6571

Presentation/Home/HomeSearch/HomeSearchView.swift

-4
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ private struct HomeSearchListView: View {
8686
selectedPaper = paperInfo
8787
deleteAlertPresented.toggle()
8888
}
89-
90-
Rectangle()
91-
.foregroundStyle(.primary3)
92-
.frame(height: 1)
9389
}
9490
.padding(.leading, 30)
9591
}

Presentation/Home/Paper/PaperListView.swift

+10-8
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ struct PaperListView: View {
9494

9595
Spacer()
9696
} else {
97-
ScrollView {
98-
VStack(spacing: 0) {
99-
Spacer().frame(height: 6)
100-
97+
VStack(spacing: 0) {
98+
Spacer().frame(height: 6)
99+
100+
List {
101101
ForEach(homeViewModel.filteredLists, id: \.self) { paperInfo in
102102
// MARK: searchview 들어갈 위치
103103
HomePDFCell(
@@ -119,13 +119,15 @@ struct PaperListView: View {
119119
deleteAlertPresented.toggle()
120120
}
121121
)
122-
123-
Rectangle()
124-
.frame(height: 1)
125-
.foregroundStyle(.primary3)
122+
.listRowSeparator(.hidden)
123+
.listRowBackground(Color.clear)
124+
.listRowInsets(EdgeInsets())
126125
}
127126
.padding(.leading, 24)
128127
}
128+
.listStyle(PlainListStyle())
129+
.scrollContentBackground(.hidden)
130+
.background(Color.clear)
129131
}
130132
}
131133
}

0 commit comments

Comments
 (0)