Giter VIP home page Giter VIP logo

zkcarousel's Introduction

ZKCarousel

CI Status Version 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: #imageLiteral(resourceName: "demo2"), title: "Hello There ๐Ÿ‘ป", description: "Welcome to the ZKCarousel demo! Swipe left to view more slides!")
        let slide1 = ZKCarouselSlide(image: #imageLiteral(resourceName: "demo"), title: "A Demo Slide โ˜๐Ÿผ", description: "lorem ipsum devornum cora fusoa foen sdie ha odab ebakldf shjbesd ljkhf")
        let slide2 = ZKCarouselSlide(image: #imageLiteral(resourceName: "demo2"), 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()
    
        self.carousel.frame = CGRect()
        self.view.addSubView(self.carousel)
    }

}

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.

zkcarousel's People

Contributors

zacharykhan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.