diff --git a/VDSSample/ViewControllers/CarouselViewController.swift b/VDSSample/ViewControllers/CarouselViewController.swift index 1e66088..f89517a 100644 --- a/VDSSample/ViewControllers/CarouselViewController.swift +++ b/VDSSample/ViewControllers/CarouselViewController.swift @@ -61,16 +61,10 @@ class CarouselViewController: BaseViewController { var paginationInsetField = NumericField() var selectedIndexField = NumericField() var rows: [UIView] = [] - var infoLabel = Label().with { $0.textStyle = .boldBodyMedium } override func viewDidLoad() { super.viewDidLoad() - infoLabel.text = "Added Border To Slot Only For VQA Test." - let stack = UIStackView(arrangedSubviews: [component, infoLabel]).with { - $0.axis = .vertical - $0.spacing = 25 - } - addContentTopView(view: stack) + addContentTopView(view: component) setupPicker() setupModel() } @@ -138,9 +132,19 @@ class CarouselViewController: BaseViewController { rows.append(Button().with{ $0.use = .secondary; $0.text = "Shop"; $0.onClick = onClick}) rows.append(Button().with{ $0.use = .secondary; $0.text = "Buy"; $0.onClick = onClick}) rows.append(Button().with{ $0.use = .secondary; $0.text = "Offer"; $0.onClick = onClick}) - component.views = rows + component.views = rows.compactMap({ view in + return TileContainer().with { instance in + instance.aspectRatio = .none + instance.addContentView(view) + instance.color = .custom(.lightGray) + } + }) label.text = "0" + component.slotAlignment = .init(vertical: Carousel.Vertical.top, horizontal: Carousel.Horizontal.left) + horizAlignmtPickerSelectorView.text = Carousel.Horizontal.left.rawValue + vertAlignmtPickerSelectorView.text = Carousel.Vertical.top.rawValue + // Callback when moving the carousel. Returns selectedGroupIndex. component.onChange = { [weak self] selectedGroupIndex in guard let self else { return } @@ -152,7 +156,6 @@ class CarouselViewController: BaseViewController { surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in self?.component.surface = item self?.contentTopView.backgroundColor = item.color - self?.infoLabel.surface = item } paginationDisplayPickerSelectorView.onPickerDidSelect = { [weak self] item in