宽容他人,放过自己。

图片变异轮播第三方iCarousel

Posted on By anchoriteFili

3d图片滚动样式.zip

752372-20151028185729591-1677504309.png

快速载入

#pragma mark 设置添加的总的图片数量
- (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel
{
    return 30;
}

#pragma mark 在此处添加图片
- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index
{
    UIView *view = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:[NSString stringWithFormat:@"%d.jpg",index]]] autorelease];
    
#pragma mark 调整图片的显示尺寸
    view.frame = CGRectMake(70, 80, 220, 100);
    return view;
}

#pragma mark 占位图数量
- (NSUInteger)numberOfPlaceholdersInCarousel:(iCarousel *)carousel
{
    return 0;
}

#pragma mark 当前屏内显示的图片数量
- (NSUInteger)numberOfVisibleItemsInCarousel:(iCarousel *)carousel
{
    return 6;
}

#pragma mark 设置中间图片的宽度
- (CGFloat)carouselItemWidth:(iCarousel *)carousel
{
//    return ITEM_SPACING;
    return 250;
    
}