2013-09-06 1 views
-3
- (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; 

} 

제발이 컬렉션 뷰의 항목을 자동으로 가로 스크롤 할 수 있습니다.UICollectionView를 사용한 자동 스크롤

내 모음보기에 대해이 설정으로 자동 스크롤을 얻으려면 어떻게해야합니까?

+0

자동 스크롤이란 무엇을 의미 할 수 있습니까? 어디로 스크롤합니까? 언제? –

+0

@TimothyMoose 아직 아무 것도 시도하지 않았습니다. 나는 앞으로 어떻게 나아갈 지 너무 확신하지 못한다. 달성하고자하는 최종 결과는 라운드 로빈 방식으로 항목을 스크롤하는 슬라이드 쇼와 유사합니다. –

답변

1

체크 아웃 iCarousel. 통합이 매우 쉽고 문제를 해결할 것입니다.

관련 문제