title: Scrolling horizontal and vertical both direction
body: <p>I have requirement to scroll the images horizontally and vertically.</p>
  
  <p>I have sections which will <code>segregated vertically</code> and <code>in each section itself it will be so many images which will be scrolled horizontally</code>.</p>
  
  <p>I made vertical scrolling using <code>UICollectionView</code> with <a href="http://www.raywenderlich.com/22417/beginning-uicollectionview-in-ios-6-part-22" rel="nofollow">Ray wenderlich tutorial</a> but how do I get horizontal scrolling in each section?</p>
  
  <p>Should I use any other object like <code>UITableView</code> or <code>UIScrollview</code> for this purpose?</p>
  
  <p>Any tutorial available how to achieve this?</p>
  
  <p><code>Is it compulsory to implement Layout subclass or UICollectionviewFlowlayout when using collection view</code>? </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Till now I have implemented this code which scrolls vertically and has 5 sections each but not able to scroll the individual sections</p>
  
  <pre><code>- (NSInteger)collectionView:(UICollectionView *)view numberOfItemsInSection:(NSInteger)section;
  {
      NSArray *arrayReturn = [self returnArray:section];
      return arrayReturn.count;
  }
  
  - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
  {   
      return 5;
  }
  
  - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      ImageCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"imagecell" forIndexPath:indexPath];
  
      NSBlockOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
          NSArray *arrSection = [NSArray arrayWithArray:[self returnArray:indexPath.section]];
          NSString *fileName = [arrSection objectAtIndex:indexPath.row];
          UIImage *image = [UIImage imageNamed:fileName];
  
             dispatch_async(dispatch_get_main_queue(), ^{
  //               cell.imgVw.image = ;
                 if([CollectionView.indexPathsForVisibleItems containsObject:indexPath]){
                     ImageCell *currentCell = (ImageCell *) [cv cellForItemAtIndexPath:indexPath];
                     currentCell.imgVw.image = image;
                 }
  
             });
      }];
  
      [self.thumbnailQueue addOperation:operation];
  
      return cell;
  }
  
  - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
  {
  
      HeaderView *Header = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"PhotoHeaderView" forIndexPath:indexPath];
  
      Header.lblHeaderTitle.text = @"Header title";
  
      Header.backgroundColor = [UIColor yellowColor];
      return Header;
  }
  </code></pre>