Giter VIP home page Giter VIP logo

jolimageslider's Introduction

JOLImageSlider

An infinite image slider that supports auto-scrolling and titles.

Based heavily on KIImagePager: https://github.com/kimar/KIImagePager

Implementing

First you'll need to create an array of JOLImageSlides:

JOLImageSlide *slide = [[JOLImageSlide alloc] init];
slide.title = @"Hello World";
slide.image = @"http://vipdictionary.com/img/istockphoto_3905249-dignified-mustache-man.jpg";

JOLImageSlide *slide2 = [[JOLImageSlide alloc] init];
slide2.title = @"Hello World (again)";
slide2.image = @"http://img3.etsystatic.com/016/1/5193227/il_340x270.426695535_bso3.jpg";

JOLImageSlide *slide3 = [[JOLImageSlide alloc] init];
slide3.title = @"Lost Slide";
slide3.image = @"http://google.com/asdf.png";

NSArray *slideSet = [[NSArray alloc] initWithObjects: slide, slide2, slide3, nil];

Initialize the image slider:

JOLImageSlider *imageSlider = [[JOLImageSlider alloc] initWithFrame:CGRectMake(0, 0, 320, 140) andSlides: slideSet];

[imageSlider setAutoSlide: YES];
[imageSlider setPlaceholderImage:@"placeholder.png"];
[imageSlider setContentMode: UIViewContentModeScaleAspectFill];

[self.view addSubview: imageSlider];

[Optionally] add the JOLImageSliderDelegate:

imageSlider.delegate = self;

With the delegate method

- (void) imagePager:(JOLImageSlider *)imagePager didSelectImageAtIndex:(NSUInteger)index {
    NSLog(@"Selected slide at index: %i", index);
}

Dependencies

JOLImageSlider uses SDWebImage -- to initialize and checkout this submodule:

git submodule update --init --recursive

jolimageslider's People

Contributors

jaysonlane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jolimageslider's Issues

Array of images?

Hello,
I'm just learning, so hope the question is not really stupid... Is there any way to give an array of images to this controller to avoid need to allocate each image separately?

Thanks in advance!

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.