Giter Site home page Giter Site logo

mohsinalimat / clabsimageslider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from confiancelabs/clabsimageslider

1.0 2.0 0.0 3.19 MB

CLabsImageSlider is a image slider written in swift language.

License: MIT License

Ruby 4.26% Swift 52.70% Objective-C 2.29% Shell 40.75%

clabsimageslider's Introduction

CLabsImageSlider

CI Status Version License Platform

Alt text

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Swift 2.2

Summary

CLabsImageSlider is a image slider written in swift language ,instead of implementing complex logics now you can create image slider with a single line of code. CLabsImageSlider loads local or remote images with multiple options like manual or auto slide etc. So save your time in writing code for page control by using CLabsImageSlider.

Installation

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

pod "CLabsImageSlider"

Step 1

From identity inspector replace UIView class of your UIView with CLabsImageSlider class in your xib or StoryBoard.

Alt text

Step 2

Create its Outlet.

  @IBOutlet weak var imgSlider: CLabsImageSlider!

Step 3 To show slider Images from Url

From viewDidLayoutSubviews function call "SetUpView" function of CLabsImageSlider

let urlImages =    ["https://s26.postimg.org/3n85yisu1/one_5_51_58_PM.png","https://s26.postimg.org/65tuz7ek9/two_5_41_53_PM.png","https://s26.postimg.org/7ywrnizqx/three_5_41_53_PM.png","https://s26.postimg.org/6l54s80hl/four.png","https://s26.postimg.org/ioagfsbjt/five.png"]

override func viewDidLayoutSubviews() {

imgSlider.setUpView(.Url(imageArray:urlImages,placeHolderImage:UIImage(named:"placeHolder")),slideType:.ManualSwipe,isArrowBtnEnabled: true)
 
    }

To Show Local Images

 let localImages =   ["one.jpg","two.jpg","three.jpg","four.jpg","five.jpg","six.jpg"]
 
  override func viewDidLayoutSubviews() {
  
     imgSlider.setUpView(.Local(imageArray: localImages),slideType: .ManualSwipe,isArrowBtnEnabled: true)
  
    }
 

Optional Step

  • Apply imageSliderDelegate
class ViewController: UIViewController,imageSliderDelegate

override func viewDidLoad() {
        super.viewDidLoad()
        
     imgSlider.sliderDelegate   =   self
    
    
    }
  • Use its Delegate function
 func didMovedToIndex(index:Int)
    {
        print("did moved at Index : ",index)
    }

YouTube Link

https://www.youtube.com/channel/UCwYjZ3vXQYhJaRwUm6u9-bA

Author

ConfianceLabs, [email protected]

License

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

clabsimageslider's People

Contributors

confiancelabs avatar

Stargazers

MohsinAli avatar

Watchers

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