Latest 1.3.0
Homepage https://github.com/litt1e-p/LPCarouselView
License MIT
Platforms ios 7.0, requires ARC
Dependencies SDWebImage
Frameworks Foundation, UIKit
Authors

Carousel auto scroll view with pageControl which is based on UICollectionView and http/https supports

Usage

needs one line code only!

//load remote images
LPCarouselView *cv = [LPCarouselView carouselViewWithFrame:CGRectMake(0, 200, self.view.bounds.size.width, 150) placeholderImage:[UIImage imageNamed:@"carousel01"] images:^NSArray *{
        return @[
                 @"https://d13yacurqjgara.cloudfront.net/users/3460/screenshots/1667332/pickle.png",
                 @"https://d13yacurqjgara.cloudfront.net/users/610286/screenshots/2012918/eggplant.png",
                 @"https://d13yacurqjgara.cloudfront.net/users/514774/screenshots/1985501/ill_2-01.png",
                 ];
    } titles:^NSArray *{
        return @[@"NO. 1", @"NO. 2", @"NO. 3"];
    } selectedBlock:^(NSInteger index) {
        NSLog(@"clicked1----%zi", index);
    }];

//load local images
LPCarouselView *cv2 = [LPCarouselView carouselViewWithFrame:CGRectMake(0, 400, self.view.bounds.size.width, 150) placeholderImage:nil images:^NSArray *{
        return @[
                 @"carousel01.png",
                 @"carousel02.png",
                 @"carousel03.png",
                 @"carousel04.png",
                 @"carousel05.png",
                 ];
    } titles:^NSArray *{
        return @[@"NO. 1", @"NO. 2", @"NO. 3", @"NO. 4", @"NO. 5"];
    } selectedBlock:^(NSInteger index) {
        NSLog(@"clicked2----%zi", index);
    }];

there are some attributes (pageControlIndicatorColors)for your configuration just follow the sample code

Install

  • use cocoapods
    pod 'LPCarouselView', '~> 1.2.6'
  • manual import
    just download lib folder and add into your project

Screenshot

LPCarouselView

Release notes

  • 1.2.6

update SDWebImage dependencies

  • 1.2.5

add turn off single image loop

  • 1.2.4

fix bug of setting scrollDuration causing the infiniteLoop

  • 1.2.3

fix the bug of scrollToTop invalid

  • 1.2.2

bugfix for none images

  • 1.2.1

image contentMode bugfix

  • 1.2

add pageControl tintColor & infinite loop properties

  • 1.1

scroll duration bugfix and add default duration

  • 1.0

origin version.

Latest podspec

{
    "name": "LPCarouselView",
    "version": "1.3.0",
    "summary": "Carousel auto scroll view with pageControl which is based on UICollectionView",
    "description": "Carousel auto scroll view with pageControl which is based on UICollectionView and SDWebImage with http/https supports",
    "homepage": "https://github.com/litt1e-p/LPCarouselView",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "litt1e-p": "[email protected]"
    },
    "source": {
        "git": "https://github.com/litt1e-p/LPCarouselView.git",
        "tag": "1.3.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "LPCarouselView/*",
    "dependencies": {
        "SDWebImage": [
            "~> 4"
        ]
    },
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This