TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | May 2017 |
Maintained by litt1e-p.
Carousel auto scroll view with pageControl which is based on UICollectionView and http/https supports
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
pod 'LPCarouselView', '~> 1.2.6'
just download lib folder and add into your project
update SDWebImage dependencies
add turn off single image loop
fix bug of setting scrollDuration causing the infiniteLoop
fix the bug of scrollToTop invalid
bugfix for none images
image contentMode bugfix
add pageControl tintColor & infinite loop properties
scroll duration bugfix and add default duration
origin version.