- (UICollectionViewCell *) collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
SliderCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"articleCellslider" forIndexPath:indexPath];
NSDictionary *item = [_articleListslider objectAtIndex:indexPath.item];
// set the article image
[cell.image setImageWithURL:[item objectForKey:@"image"]];
// set the text of title UILabel
cell.title.text = [NSString stringWithFormat:@"%@\n\n\n\n", [item objectForKey:@"title"]];
cell.title.textColor = [UIColor colorWithRed:33.0f/255.0f green:74.0f/255.0f blue:146.0f/255.0f alpha:1.0f];
// set the text of summary UILabel
cell.description.text = [NSString stringWithFormat:@"%@\n\n\n\n\n\n\n\n\n", [item objectForKey:@"description"]];
cell.description.font = [UIFont fontWithName:@"Helvetica Neue" size:14];
cell.targetURL = [item objectForKey:@"link"];
cell.sliderphoto = [item objectForKey:@"sliderphoto"];
cell.date.text = [NSString stringWithFormat:@"%@\n\n\n\n", [item objectForKey:@"pubDate"]];
cell.category.text = [NSString stringWithFormat:@"%@\n\n\n\n", [item objectForKey:@"category"]];
return cell;
}
我的目的是让此集合视图中的项目自动水平滚动。
如何使用此设置为我的集合视图自动滚动?