All Projects β†’ ZacharyKhan β†’ Zkcarousel

ZacharyKhan / Zkcarousel

Licence: mit
A simple carousel implementation written in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Zkcarousel

Fapaginationlayout
Collection view pagination layout
Stars: ✭ 276 (+69.33%)
Mutual labels:  xcode, collectionview
InfiniteCarousel
πŸ’ˆInfinite Carousel Collection View
Stars: ✭ 67 (-58.9%)
Mutual labels:  carousel, collectionview
Containercontroller
UI Component. This is a copy swipe-panel from app: Apple Maps, Stocks. Swift version
Stars: ✭ 273 (+67.48%)
Mutual labels:  xcode, collectionview
Hfcardcollectionviewlayout
The HFCardCollectionViewLayout provides a card stack layout not quite similar like the apps Reminder and Wallet.
Stars: ✭ 281 (+72.39%)
Mutual labels:  xcode, collectionview
Hjcarouseldemo
Stars: ✭ 437 (+168.1%)
Mutual labels:  carousel, collectionview
Collectionnode
a collectionView made for Sprite Kit
Stars: ✭ 96 (-41.1%)
Mutual labels:  xcode, collectionview
Paging Collection View Layout
custom collection view layout that allows you to page by cell, not screen
Stars: ✭ 65 (-60.12%)
Mutual labels:  carousel, collectionview
Emptykit
A lightweight, swift library for displaying emptyView whenever the view(tableView/collectionView) has no content to display, just like DZNEmptyDataSet
Stars: ✭ 117 (-28.22%)
Mutual labels:  xcode, collectionview
Zewo
Lightweight library for web server applications in Swift on macOS and Linux powered by coroutines.
Stars: ✭ 1,856 (+1038.65%)
Mutual labels:  xcode
Radar Covid Ios
Native iOS app using DP^3T iOS sdk to handle Exposure Notification framework from Apple
Stars: ✭ 157 (-3.68%)
Mutual labels:  xcode
Tesseract Macos
Objective C wrapper for the open source OCR Engine Tesseract (macOS)
Stars: ✭ 154 (-5.52%)
Mutual labels:  xcode
Comment Spell Checker
Xcode extension for spell checking and auto-correcting code comments.
Stars: ✭ 155 (-4.91%)
Mutual labels:  xcode
Pulley
A library to imitate the iOS 10 Maps UI.
Stars: ✭ 1,928 (+1082.82%)
Mutual labels:  xcode
Rxrealmdatasources
An easy way to bind an RxRealm observable to a table or collection view
Stars: ✭ 154 (-5.52%)
Mutual labels:  collectionview
Learning React Native
React Native Learning Notebook
Stars: ✭ 158 (-3.07%)
Mutual labels:  xcode
Swiftcolorgen
A tool that generate code for Swift projects, designed to improve the maintainability of UIColors
Stars: ✭ 152 (-6.75%)
Mutual labels:  xcode
Mhsoftui
Extension for Neumorphic Soft UI effect in Swift
Stars: ✭ 151 (-7.36%)
Mutual labels:  xcode
Cardslider
Card Slider is an android component allows you to implement carousel effect with infinite indicators and more features
Stars: ✭ 160 (-1.84%)
Mutual labels:  carousel
Cdmarkdownkit
An extensive Swift framework providing simple and customizable markdown parsing.
Stars: ✭ 158 (-3.07%)
Mutual labels:  xcode
React Native Unified Contacts
Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
Stars: ✭ 156 (-4.29%)
Mutual labels:  xcode

ZKCarousel

Swift 5.2 Version Build Status License Platform

Demo

Example

To run the example project, clone the repo, and run pod install from the Example directory first. Then, open the .xcworkspace and run the project within Xcode.

Installation

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

pod 'ZKCarousel'

Then, cd into the directory containing your podfile and run pod install

Usage

ZKCarousel can be instantiated either programatically or via Storyboards.

Storyboards

See example project for instructions on how to use ZKCarousel with storyboards.

Programatically

import UIKit
import ZKCarousel

class ViewController : UIViewController {

    let carousel : ZKCarousel = {
        let carousel = ZKCarousel()
        
        // Create as many slides as you'd like to show in the carousel
        let slide = ZKCarouselSlide(image: UIImage(), title: "Hello There πŸ‘»", description: "Welcome to the ZKCarousel demo! Swipe left to view more slides!")
        let slide1 = ZKCarouselSlide(image: UIImage(), title: "A Demo Slide ☝🏼", description: "lorem ipsum devornum cora fusoa foen sdie ha odab ebakldf shjbesd ljkhf")
        let slide2 = ZKCarouselSlide(image: UIImage(), title: "Another Demo Slide ✌🏼", description: "lorem ipsum devornum cora fusoa foen ebakldf shjbesd ljkhf")     
        
        // Add the slides to the carousel
        carousel.slides = [slide, slide1, slide2]
        
        return carousel
    }()

    override func viewDidLoad() {
        super.viewDidLoad()
    
        carousel.frame = CGRect()
        view.addSubView(self.carousel)
    }

}

Auto-Traverse Slides

There is an option to let ZKCarousel switch between slides automatically. All you have to do is use the start() and stop() functions on ZKCarousel. You can also set the time interval between slides by setting the interval property. The default interval is 2 seconds.

See example for a working implementation of this.

Custom Gesture Recognizers

If you would like to add a custom action upon tapping the carousel (as opposed to the default action, which changes to the next slide) you will need to first call disableTap() to remove the default gesture recognizer, then add your own gesture recognizer to the UICollectionView.

Contributions

If you're interested in contributing to ZKCarousel, please fork the repository and submit a pull request. All contributions are welcome and encouraged! :)

For all bug reports, feature requests, etc. please submit an issue to the repository.

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].