guowilling / srcarouselview Goto Github PK
View Code? Open in Web Editor NEWA carousel view that only uses two UIImageView to achieve infinite carousel.
License: MIT License
A carousel view that only uses two UIImageView to achieve infinite carousel.
License: MIT License
hello,
initiating from the delegate callback displays nothing, could you take a look into that ?
thank you
轮播图只显示第一张图,左滑或者右滑。也只显示第一张图
我的代码如下:(图片地址随便找的)
NSArray *ttarray = @[
@"https://my.com/images/boards/de84562406fcdf6e1d7a91082cef2ab9ba9cfc7e.jpeg?imageView2/1/w/1242/h/630",
@"https://my.com/images/boards/32f0be9bd27a9b1afc7014136694f65e40f43b90.jpeg?imageView2/1/w/1242/h/630",
@"https://my.com/images/boards/06e8e95a88c8eb0edf39b44b1e91659dfd24ef77.jpeg?imageView2/1/w/1242/h/630",
@"https://my.com/images/boards/492e46367bd9498fb18a4abe35c8f49b5ca9d62b.jpg?imageView2/1/w/1242/h/630"
];
SRCarouselView *billboards = [SRCarouselView sr_carouselViewWithImageArrary:ttarray describeArray:@[@"1", @"2", @"3", @"4"] placeholderImage:nil block:^(NSInteger index) {
NSLog(@"%li", (long)index);
}];
billboards.frame = CGRectMake(0, 64, self.view.bounds.size.width, 210);
billboards.autoPagingInterval = 5.0;
[self.view addSubview:billboards];
I have tried it on ipad air 2, it doesn't take advantage of full width
It would be nice to make it responsive when rotating screen.
Hi ,
i tried to use two SRinfiniteCarouselView in the same viewcontroller , they dont have the same size of arrays , it works fine in simulator , but when debuging using a mobile , i get exception index out of bounds .
the error is on the following function
(SRImageManager *)imageManager {
if (!_imageManager) {
__weak typeof(self) weakSelf = self;
_imageManager = [SRImageManager shareManager];
_imageManager.downloadImageSuccess = ^(UIImage *image, NSString *imageURLString, NSInteger imageIndex) {
weakSelf.images[imageIndex] = image;
if (weakSelf.currentIndex == imageIndex) {
[weakSelf.currentImageView performSelectorOnMainThread:@selector(setImage:) withObject:image waitUntilDone:NO];
}
};
}
return _imageManager;
}
Hi i've been trying to implement the carousel with the recent update but i havent been able to
let carouselView = SRInfiniteCarouselView(imageArrary: arrayImages, describe: nil, placeholderImage: #imageLiteral(resourceName: "placeholderCover"))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.