A lightweight 3D Linear Carousel with parallax effect

Overview

TGLParallaxCarousel

CI Status Version License Platform

A lightweight 3D Linear Carousel with parallax effect

[GIF] Threedimensional & Normal mode

Threedimensional demo Normal demo

Installation

TGLParallaxCarousel is available through CocoaPods. To install it, simply add the following line to your Podfile:

Swift 3:

pod 'TGLParallaxCarousel'

Swift 2.2:

pod 'TGLParallaxCarousel' ', '~> 0.3'

Usage

  1. Place one UIView object in your VC in the Storyboard and set it as subclass of TGLParallaxCarousel

  2. Create an IBOutlet in your VC.swift file, connect it a connect delegate and datasource.

@IBOutlet weak var carouselView: TGLParallaxCarousel!

override func viewDidLoad() {
super.viewDidLoad()

carouselView.delegate = self
carouselView.margin = 10
carouselView.selectedIndex = 2
carouselView.type = .threeDimensional
}
  1. Conform to delegate
extension ViewController: TGLParallaxCarouselDelegate {

func numberOfItemsInCarouselView(_ carouselView: TGLParallaxCarousel) -> Int {
return 5
}

func carouselView(_ carouselView: TGLParallaxCarousel, itemForRowAtIndex index: Int) -> TGLParallaxCarouselItem {
return CustomView(frame: CGRect(x: 0, y: 0, width: 300, height: 150) , number: index)
}

func carouselView(_ carouselView: TGLParallaxCarousel, didSelectItemAtIndex index: Int) {
print("Tap on item at index \(index)")
}

func carouselView(_ carouselView: TGLParallaxCarousel, willDisplayItem item: TGLParallaxCarouselItem, forIndex index: Int) {
print("")
}
}
  1. Enjoy!

Author

taglia3, [email protected]

LinkedIn, Matteo Tagliafico

License

TGLParallaxCarousel is available under the MIT license. See the LICENSE file for more info.

You might also like...
🎨 Mondrian is lightweight Swift package that provides a universal basis for your design system's color palette.

🧑‍🎨 Mondrian Mondrian provides a universal basis on which to build your design system's color palette right from your codebase. With support for all

Dynamic and type-safe framework for building linear and non-linear flows.

FlowKit FlowKit is a dynamic flow framework capable of building a flow, based on conditions and ordered according to a logic of next steps. By using F

Apple TV Parallax effect in Swift.
Apple TV Parallax effect in Swift.

MPParallaxView Apple TV Parallax effect in Swift. Rotate view using touch or accelerometer. Usage To run the example project, clone the repo, and run

tvOS controls and extensions that add parallax effect to your application.
tvOS controls and extensions that add parallax effect to your application.

ParallaxView Summary Easy to use UIView, UICollectionViewCell with parallax effect and extensions to add this effect to any UIView. Rotate view using

iOS 7/8 style side menu with parallax effect.
iOS 7/8 style side menu with parallax effect.

RESideMenu iOS 7/8 style side menu with parallax effect inspired by Dribbble shots (first and second). Since version 4.0 you can add menu view control

Beautiful iOS side menu library with parallax effect. Written in Swift
Beautiful iOS side menu library with parallax effect. Written in Swift

AKSideMenu AKSideMenu is a double side menu library with parallax effect. Example Project See the contained examples to get a sample of how AKSideMenu

Parallax scrolling effect on UITableView header view when a tableView is scrolled
Parallax scrolling effect on UITableView header view when a tableView is scrolled

ParallaxTableViewHeader Parallax scrolling effect on UITableView header view when a tableView is scrolled Usage Create a ParallaxHeaderView using eith

✨ Super easy Parallax and Haptic Effect.
✨ Super easy Parallax and Haptic Effect.

IParallaxAndHapticEffect ✨ Super easy Parallax and Haptic Effect. This library helps you easily use the 'Parallax' and 'Haptic' effects. Customized 3D

A tiny category on UIView that allows you to set one property:
A tiny category on UIView that allows you to set one property: "parallaxIntensity" to achieve a parallax effect with UIMotionEffect

NGAParallaxMotion A tiny category on UIView that allows you to set one property: parallaxIntensity to achieve a parallax effect with UIMotionEffect. S

A Swift port of the Cassowary linear constraint solver

Cassowary Swift A Swift port of the Cassowary linear constraints solver. Tested on OS X, iOS and Linux. Example usage let solver = Solver() let left

SwiftRegressor - A linear regression tool that’s flexible and easy to use

SwiftRegressor - A linear regression tool that’s flexible and easy to use

Material Linear Progress Bar for your iOS apps
Material Linear Progress Bar for your iOS apps

LinearProgressBar Material Linear Progress Bar for your iOS apps Installation Carthage: github "Recouse/LinearProgressBar" CocoaPods: Add this to you

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

DG Carousel Flow Layout
DG Carousel Flow Layout

DGCarouselFlowLayout A carousel flow layout for UICollectionView on iOS. Require

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 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

Loopy Carousel: Submission to the SwiftUI Series **Workarounds** challenge
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

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

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

Simple and lightweight UITableViewController with accordion effect (expand / collapse cells)
Simple and lightweight UITableViewController with accordion effect (expand / collapse cells)

AEAccordion UITableViewController with accordion effect (expand / collapse cells) Simple and lightweight solution for making accordion effect in table

Comments
  • elements on custom view are not visible

    elements on custom view are not visible

    `class CustomView: TGLParallaxCarouselItem {

    // MARK: - outlets
    @IBOutlet private weak var numberLabel: UILabel!
     @IBOutlet private weak var PlanName: UILabel!
    // MARK: - properties
    private var containerView: UIView!
    private let nibName = "CustomView"
    

    // @IBInspectable // var number: Int = 0 { // didSet{ // numberLabel.text = "(number)" // } // }

    // MARK: - init
    convenience init(frame: CGRect, plan: CompanyPaymentPlan) {
        self.init(frame: frame)
        numberLabel.text = String(plan.amount)
        PlanName.text = plan.name
    }`
    
    question 
    opened by hemant3370 1
  • Accessing Items

    Accessing Items

    You cannot create new carousels. A solution would be to make the carousel items public rather than a private property. This way, if someone needs to make a new carousel of items, they can removeAll() items in the carousel.

    enhancement 
    opened by ellscha 1
  • Swift 4 mmigration + custom linear or circular cycle mode and hide page Control

    Swift 4 mmigration + custom linear or circular cycle mode and hide page Control

    Added the followings functionalities:

    • Swift 4 migration

    • Can hide page control with carouselView.setPageControlHidden(hide: true | false)

    • Set mode (linear or circular) with carouselView.mode = .linear | .circular

    opened by alfredolucomav 0
  • Help using the library

    Help using the library

    Sorry, maybe it's my ios experience;but I'm finding the usage of this library quite cryptic. Like how do we set up a custom view ? Why can't we just return an image view ? etc...

    opened by chris9753 0
Releases(0.3)
Owner
Matteo Tagliafico
I'm an Electronic Engineer with the passion for iOS development
Matteo Tagliafico
You can use blur effect and it's animation easily to call only two methods.

SABlurImageView You can use blur effect and it's animation easily to call only two methods. ManiacDev.com referred. https://maniacdev.com/2015/04/open

Taiki Suzuki 555 Dec 17, 2022
Ken Burns effect with face recognition!

APKenBurnsView Ken Burns effect with face recognition! APKenBurnsView is UIView subclass which supports face recognition to beautifully animate people

Alty 96 Sep 3, 2022
A lightweight generic cache for iOS written in Swift with extra love for images.

Haneke is a lightweight generic cache for iOS and tvOS written in Swift 4. It's designed to be super-simple to use. Here's how you would initalize a J

Haneke 5.2k Dec 11, 2022
A lightweight and fast image loader for iOS written in Swift.

ImageLoader ImageLoader is an instrument for asynchronous image loading written in Swift. It is a lightweight and fast image loader for iOS. Features

Hirohisa Kawasaki 293 Nov 24, 2022
🍁🥓 Lightweight and fast Swift library for image downloading, caching and transformations

MapleBacon Introduction MapleBacon is a lightweight and fast Swift library for downloading and caching images. Example The folder Example contains a s

Jan Gorman 335 Nov 1, 2022
A simple, performant, and lightweight SVG parser

Key Features Parsing performance that meets or beats other popular SVG Frameworks A simple architecture, optimized for extension, flexibility and deve

Michael Choe 1.8k Dec 29, 2022
An extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memory and disk caching for iOS and  Watch.

KFSwiftImageLoader KFSwiftImageLoader is an extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memor

Kiavash Faisali 343 Oct 29, 2022
AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.

URLImage URLImage is a SwiftUI view that displays an image downloaded from provided URL. URLImage manages downloading remote image and caching it loca

Dmytro Anokhin 1k Jan 4, 2023
Lightweight and customisable async image loading in SwiftUI. Supports on-disk storage, placeholders and more!

Asyncrounously download and display images in Swift UI. Supports progress indicators, placeholders and image transitions. RemoteImageView Asyncrounous

Callum Trounce 192 Dec 7, 2022
Lightweight iOS Photo Blur App

Blurry Blurry is the go-to image blurring tool to help you apply beautiful blurs for your photos. It is perfect for creating wallpapers, backgrounds,

Andy 17 Nov 22, 2022