Skip to content

Commit

Permalink
feat: #140 인디케이터 간격조절
Browse files Browse the repository at this point in the history
  • Loading branch information
hooni0918 committed Jan 22, 2025
1 parent 57381ca commit fbc5ee8
Showing 1 changed file with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,31 @@ struct PlaceCard: View {
@Binding var currentPage: Int

var body: some View {
VStack(spacing: 0) {
TabView(selection: $currentPage) {
ForEach(places.indices, id: \.self) { index in
PlaceCardItem(place: places[index])
.tag(index)
VStack(spacing: 0) {
TabView(selection: $currentPage) {
ForEach(places.indices, id: \.self) { index in
PlaceCardItem(place: places[index])
.tag(index)
.padding(.horizontal, 26)
}
}
}
.padding(.horizontal, 26)
.frame(height: 264.adjusted)
.tabViewStyle(.page(indexDisplayMode: .never))
.background(.clear)

ZStack {
if places.count > 1 {
PageIndicator(
currentPage: currentPage,
pageCount: places.count
)
.padding(.vertical, 4.adjustedH)
.frame(maxWidth: .infinity)
.frame(height: 264.adjusted)
.tabViewStyle(.page(indexDisplayMode: .never))
.background(.clear)
ZStack {
if places.count > 1 {
PageIndicator(
currentPage: currentPage,
pageCount: places.count
)
.padding(.vertical, 4)
}
}
.frame(height: 8)
}
.frame(height: 8.adjustedH)
}
}
}

private struct PlaceCardItem: View {
Expand Down

0 comments on commit fbc5ee8

Please sign in to comment.