Slideshow - An automatic scrolling carousel similar to how ScrollView is used

Overview

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

some View { ZStack { Image(item.image) .resizable() .aspectRatio(contentMode: .fill) .frame(height: 200) } }">
    struct Item: Identifiable {
        let id = UUID()
        let image: String
        let title: String
    }
    
    let items = [
        Item(image: "image1", title: "first"),
        Item(image: "image2", title: "second"),
        Item(image: "image3", title: "third"),
        Item(image: "image4", title: "fourth")
    ]
    
    var body: some View {
        VStack {
            Spacer()
            Slideshow(items, spacing: 20, isWrap: true, autoScroll: .active(2)) { item in
                itemView(item: item)
                    .frame(width: 350, height: 200)
                    .cornerRadius(16)
            }
            .frame(width: UIScreen.main.bounds.width, height: 200)
            Spacer()
        }
    }
    
    @ViewBuilder
    func itemView(item: Item) -> some View {
        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

You might also like...
A page control similar to that used in Instagram
A page control similar to that used in Instagram

ISPageControl ISPageControl has a page control similar to that used in the Instagram Contents Requirements Installation Usage Communication Credits Li

A set of libraries used for parsing representations of Swift Packages similar to how SwiftPM itself works

A set of libraries used for parsing representations of Swift Packages similar to how SwiftPM itself works, but also supporting Xcode specific features (such as Swift Playground Apps).

OysterKit is a framework that provides a native Swift scanning, lexical analysis, and parsing capabilities. In addition it provides a language that can be used to rapidly define the rules used by OysterKit called STLR

OysterKit A Swift Framework for Tokenizing, Parsing, and Interpreting Languages OysterKit enables native Swift scanning, lexical analysis, and parsing

A general purpose embedded hierarchical lock manager used to build highly concurrent applications of all types. Same type of locker used in many of the large and small DBMSs in existence today.

StickyLocking StickyLocking is a general purpose embedded lock manager which allows for locking any resource hierarchy. Installable Lock modes allow f

Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t
Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.

twitter-text This repository is a collection of libraries and conformance tests to standardize parsing of Tweet text. It synchronizes development, tes

You can dismiss modal viewcontroller like Facebook Messenger by pulling scrollview or navigationbar in Swift.
You can dismiss modal viewcontroller like Facebook Messenger by pulling scrollview or navigationbar in Swift.

PullToDismiss PullToDismiss provides dismiss modal viewcontroller function like Facebook Messenger by pulling scrollview or navigationbar with smooth

Pull to refresh functionality for any ScrollView in SwiftUI!
Pull to refresh functionality for any ScrollView in SwiftUI!

SwiftUIPullToRefresh Pull to refresh is a common UI pattern, supported in UIKit via UIRefreshControl. (Un)surprisingly, it's also unavailable in Swift

ScrollView that supports a parallax header image and static overlay.

ScrollViewReactiveHeader A replacement ScrollView that provides a header with subtle scroll animations. example-video.mov Using ScrollViewReactiveHead

A SwiftUI ScrollView Designed to imitate the App Store and Apple Music ScrollViews (with or without a Parallax Header)
A SwiftUI ScrollView Designed to imitate the App Store and Apple Music ScrollViews (with or without a Parallax Header)

FancyScrollView I spent a lot of time looking for a way to recreate the UI of the ScrollViews in Stock Apple Apps (i.e. App Store and Apple Music) ins

Add PullToRefresh using animated GIF to any scrollView with just simple code
Add PullToRefresh using animated GIF to any scrollView with just simple code

UzysAnimatedGifPullToRefresh Add PullToRefresh using animated GIF to any scrollView with just simple code UzysAnimatedGifPullToRefresh features: simpl

High Quality Image ScrollView using cropped tiled images.
High Quality Image ScrollView using cropped tiled images.

THTiledImageView Feature 🖼 THTiledImageView fully support UIScrollView. You can subclass it and use it. 📡 Support Async Image Downloading & Caching.

MacOS scrollview nsview scrollbar bug demo

macOS SwiftUI ScrollView Scrollbar Bug Demo If you create a ScrollView that contains an NSView that intersects the scroll view's scrollbars, the scrol

A SwiftUI ScrollView that only scrolls if the content doesn't fit in the View

ScrollViewIfNeeded A SwiftUI ScrollView that only scrolls if the content doesn't fit in the View Installation Requirements iOS 13+ Swift Package Manag

SwiftUI ScrollView can pull to fresh

FreshScrollView SwiftUI ScrollView can pull to fresh One day, when I were writing a scrollview with a SwiftUI, I suddenly wanted to add a drop-down re

SwiftUI ScrollView can pull to fresh

FreshScrollView SwiftUI ScrollView can pull to fresh One day, when I were writing a scrollview with a SwiftUI, I suddenly wanted to add a drop-down re

You can dismiss modal viewcontroller like Facebook Messenger by pulling scrollview or navigationbar in Swift.
You can dismiss modal viewcontroller like Facebook Messenger by pulling scrollview or navigationbar in Swift.

PullToDismiss PullToDismiss provides dismiss modal viewcontroller function like Facebook Messenger by pulling scrollview or navigationbar with smooth

SwiftUIIndexedList - Add an index bar to a SwiftUI List or ScrollView
SwiftUIIndexedList - Add an index bar to a SwiftUI List or ScrollView

SwiftUIIndexedList Add an index bar to a SwiftUI List or ScrollView. Getting Sta

A set of SwiftUI custom modifiers to make the ScrollView snappable.
A set of SwiftUI custom modifiers to make the ScrollView snappable.

Snappable A set of SwiftUI custom modifiers to make the ScrollView snappable. The goal of this library is to provide an easy way to implement Views su

Owner
HumorousGhost
HumorousGhost
Swift image slideshow with circular scrolling, timer and full screen viewer

?? ImageSlideshow Customizable Swift image slideshow with circular scrolling, timer and full screen viewer ?? Example To run the example project, clon

Petr Zvoníček 1.7k Dec 21, 2022
BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous loading of images, animation, custom is very high.

BWMCoverView BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous l

Bi Weiming 31 Mar 10, 2021
Swift UI component - Stories instagram, slideshow, crypto wallet intro

SwiftUI and Combine - Stories intro multi-platform widget Features Long tap - pause stories showcase Tap - next story Leeway - pause before start stor

Igor 9 Dec 26, 2022
A small project written with SwiftUI achieves a scrolling effect similar to Apple Music lyrics.

Music Lyrics scrolling animation effect Since the iOS/iPadOS 13 update, Apple has brought a new scrolling lyrics feature to Apple Music. The album im

Huang Runhua 18 Nov 9, 2022
A carousel of stacked items as seen in iMessage for photos

StackedItemsCarousel A carousel of stacked items (such as photos) as seen in iMessage What? iMessage on iOS 15 shows multiple photos in a carousel of

Andreas Verhoeven 5 Sep 30, 2022
A lightweight 3D Linear Carousel with parallax effect

TGLParallaxCarousel A lightweight 3D Linear Carousel with parallax effect [GIF] Threedimensional & Normal mode Installation TGLParallaxCarousel is ava

Matteo Tagliafico 440 Dec 17, 2022
DG Carousel Flow Layout

DGCarouselFlowLayout A carousel flow layout for UICollectionView on iOS. Require

donggyu 7 Aug 6, 2022
Loopy Carousel: Submission to the SwiftUI Series **Workarounds** challenge

Loopy Carousel Submission to the SwiftUI Series Workarounds challenge. Workaround details In order to create the illusion of looping through the cards

Diego Lavalle 3 May 22, 2022
Horizontal and Vertical collection view for infinite scrolling that was designed to be used in SwiftUI

InfiniteScroller Example struct ContentView: View { @State var selected: Int = 1 var body: some View { InfiniteScroller(direction: .ve

Serhii Reznichenko 5 Apr 17, 2022
An unofficial version of the Sandwiches app and pre-built materials similar to those used in the Introduction to SwiftUI session video from WWDC20

Unofficial Sandwiches The WWDC20 Session Introduction to SwiftUI provides a tutorial-like walk-through of building a list-detail SwiftUI app from scra

James Dempsey 94 Feb 11, 2022