Test.swift 659 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // Test.swift
  3. // ACarouselDemo macOS
  4. //
  5. // Created by 帝云科技 on 2020/11/17.
  6. //
  7. import SwiftUI
  8. import ACarousel
  9. struct Test: View {
  10. var body: some View {
  11. VStack {
  12. Image("Zoro")
  13. .resizable()
  14. .scaledToFill()
  15. .frame(height: 100)
  16. .clipped()
  17. ACarousel(Array(repeating: Item(image: Image("Zoro")), count: 3)) { _ in
  18. Color.red
  19. }
  20. .frame(width: 300, height: 300, alignment: .center)
  21. }
  22. }
  23. }
  24. struct Test_Previews: PreviewProvider {
  25. static var previews: some View {
  26. Test()
  27. }
  28. }