explaingit

wenchaod/fspagerview

7,369SwiftAudience · developerComplexity · 2/5Setup · easy

TLDR

FSPagerView is a Swift library for iOS that adds a sliding image carousel or banner to your app, with built-in infinite scroll, auto-advance timer, eight visual transition styles, and customizable page indicator dots.

Mindmap

mindmap
  root((FSPagerView))
    What it does
      Image carousel
      Infinite scroll
      Auto slide timer
    Transitions
      Cross fade
      Depth zoom
      Ferris wheel
      Cover flow
    Page Indicator
      Dot colors
      Custom images
      Custom shape
    Setup
      CocoaPods
      Carthage
      Source files
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add an auto-scrolling image banner to an iOS shopping or news app without building the paging logic yourself.

USE CASE 2

Apply visual slide transitions like Cover Flow or Ferris Wheel to a card carousel by setting a single property.

USE CASE 3

Build an onboarding screen with paging cards and custom dot indicators using code or Interface Builder.

USE CASE 4

Create an infinite-looping image carousel for an Apple TV app that never reaches a hard end.

Tech stack

SwiftObjective-CCocoaPodsCarthageXcode

Getting it running

Difficulty · easy Time to first run · 30min

In plain English

FSPagerView is a Swift library for iOS developers who need to add a sliding card or banner component to an iPhone or Apple TV app. Think of the kind of image carousel you see at the top of many shopping apps, where photos automatically scroll sideways and dots at the bottom show which slide you are on. This library provides that kind of component, plus a range of visual transitions you can apply to make the sliding look more interesting. The library works by wrapping Apple's built-in collection view system, but handling the paging, animation, and infinite-scroll logic for you so you do not have to build it from scratch. You can configure it to slide automatically on a timer, loop infinitely so there is no hard end to the list, scroll horizontally or vertically, and control how far each swipe moves. Item sizes and the spacing between items are adjustable. For the visual transitions between slides, the README shows eight named styles with animated GIF previews: cross fading, zoom out, depth, linear, overlap, ferris wheel, inverted ferris wheel, cover flow, and cubic. You pick one by setting a single property. You can also create a custom transition by subclassing the transformer class the library provides. The page indicator dots at the bottom are also configurable. You can set the number of dots, change the colors for selected and unselected states, swap dots for custom images, or change the shape to any path you draw with code. Installation is available through CocoaPods, Carthage, or by copying the source files directly into an Xcode project. The library supports both Swift and Objective-C. The README includes step-by-step code examples and an explanation of how to connect the component using either code or Xcode's Interface Builder.

Copy-paste prompts

Prompt 1
Using FSPagerView in Swift, write code to set up an auto-scrolling image carousel that loops infinitely with a 3-second timer.
Prompt 2
How do I apply the Cover Flow transition style to an FSPagerView in my iOS app?
Prompt 3
Write Swift code to replace FSPagerView's dot page indicators with custom images.
Prompt 4
Show me how to connect FSPagerView to a view controller using Xcode's Interface Builder instead of code.
Prompt 5
How do I subclass FSPagerViewTransformer to build a completely custom slide transition for FSPagerView?
Open on GitHub → Explain another repo

← wenchaod on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.