Slide 20
Slide 20 text
struct ProductDetailView: View {
@ObservedObject var viewModel: ViewModel
var body: some View {
GeometryReader { geometry in
VStack(spacing: 0) {
ScrollView {
VStack(spacing: 0) {
ImageScrollView(data: viewModel.imageListData, geometry: geometry)
.frame(width: geometry.size.width, height: geometry.size.width)
ProductDetail.PriceView(data: viewModel.priceData)
ProductDetail.TitleView(data: viewModel.titleData)
ProductDetail.GroupRequirementsView(data: viewModel.groupRequirementsData)
Divider()
.padding(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16))
ProductDetail.DescriptionView(data: viewModel.descriptionData)
}
}
if viewModel.isFooterPresented {
PurchaseFooter(data: viewModel.footerData, onButtonTap: viewModel.onPurchaseButtonTap)
.frame(height: Layout.Footer.height)
}
}
}
.onAppear(perform: viewModel.onAppear)
}
}
20
ProductDetail.swift