title: UICollectionView created programmatically doesn't scroll
body: <p>I'm making a horizontal picker by using a <code>UICollectionView</code>.  It's simple enough: A <code>UIView</code> with a <code>UICollectionView</code> created programmatically, using <code>UICollectionViewFlowLayout</code> with one section, scrolling set to horizontal.  It appears onscreen, complete with the correct data in the correct cells.  But it doesn't scroll---in fact it doesn't respond to user interaction at all.</p>
  
  <p>Here's the initializer for the view:</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame andItemData:(NSArray *)itemData
  {
      self = [super initWithFrame:frame];
      if (self) {
          _itemData = itemData;
  
          UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
          [flowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
          [flowLayout setItemSize:CGSizeMake(kCellWidth, kCellHeight)];
          [flowLayout setMinimumInteritemSpacing:0.f];
          [flowLayout setMinimumLineSpacing:0.f];
  
          _collectionView = [[UICollectionView alloc] initWithFrame:[self frame] collectionViewLayout:flowLayout];
          [_collectionView setDataSource:self];
          [_collectionView setDelegate:self];
          [_collectionView setBounces:NO];
          [_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"HorizontalPickerCell"];
          [self addSubview:_collectionView];
      }
      return self;
  }
  </code></pre>
  
  <p>I tried programmatically setting <code>UserInteractionEnabled</code> to <code>YES</code>, but that didn't make any difference (nor should it have, since <code>UserInteractionEnabled</code> is set to <code>YES</code> by default).  FWIW, the collection view uses standard <code>UICollectionViewCell</code>s with <code>UILabel</code>s added to their <code>contentView</code>s as subviews.</p>
  
  <p>Any thought as to why this isn't scrolling?  Any and all help much appreciated.</p>