Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

Slideshow

This project is only for SwiftUI

An automatic scrolling carousel similar to how ScrollView is used

Preview

image

Supported Platforms

  • iOS 13.0
  • macOS 10.15
  • tvOS 13.0
  • watchOS 6.0

Usage

structItem:Identifiable{letid=UUID()letimage:Stringlettitle:String}letitems=[Item(image:"image1", title:"first"),Item(image:"image2", title:"second"),Item(image:"image3", title:"third"),Item(image:"image4", title:"fourth")]varbody:someView{VStack{Spacer()Slideshow(items, spacing:20, isWrap:true, autoScroll:.active(2)){ item initemView(item: item).frame(width:350, height:200).cornerRadius(16)}.frame(width:UIScreen.main.bounds.width, height:200)Spacer()}}@ViewBuilderfunc itemView(item:Item)->someView{ZStack{Image(item.image).resizable().aspectRatio(contentMode:.fill).frame(height:200)}}

Installation

You can add Slideshow to an Xcode project by adding it as a package dependency

About

an automatic scrolling carousel similar to how scrollview is used. for swiftui

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages