- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view {
if (!view) {
view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 110, 110)];
}
view.backgroundColor = self.recommendDataArray[index];
return view;
}
iCarousel 有一个方法可以滚动到指定的 item 位置,视图加载完直接调用滚动到第2个或者第3个 item,第一个 item 的位置就靠左边了。