title: Auto Layout in UICollectionViewCell not working
body: <p>I have a simple UICollectionView with cells that have a single UITextView. The UITextView is constrained to the edges of the cell, so they should stay the same size as the cell size.</p>
  
  <p>The problem I'm having is that for some reason these constraints are not working when I specify the cell size via collectionView:layout:sizeForItemAtIndexPath:.</p>
  
  <p>I have the cell size set to 320x50 in the Storyboard. If I return a size with 2 times the height of the cell size with sizeForItemAtIndexPath:, the UITextView stays the same height despite the constraints I set. I am using Xcode 6 GM.</p>
  
  <p>My view controller code is:</p>
  
  <pre><code>@implementation TestViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      self.collectionView.delegate = self;
      self.collectionView.dataSource = self;
  }
  
  - (void)viewDidAppear:(BOOL)animated
  {
      [super viewDidAppear:animated];
  
      UICollectionViewCell *c = [self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]];
  
      NSLog(@"%f", c.frame.size.height);
  
      UITextView *tv = (UITextView *)[c viewWithTag:9];
      NSLog(@"%f", tv.frame.size.height);
  
  }
  
  - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
  {
      return 1;
  }
  
  - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
  
      return cell;
  }
  
  - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      UICollectionViewFlowLayout *flowLayout = (UICollectionViewFlowLayout *)collectionView.collectionViewLayout;
  
      CGSize size = flowLayout.itemSize;
  
      size.height = size.height * 2;
  
      return size;
  }
  
  @end
  </code></pre>
  
  <p>Those logs in viewDidAppear: give me an output of:
  <br>
  100.00000
  <br>
  50.00000
  <br>
  As you can see, the UITextView height doesn't change with the cell height.</p>
  
  <p><br>
  Here's a screenshot of the storyboard I set up with a UITextView constrained in the UICollectionViewCell:</p>
  
  <p><img src="https://i.stack.imgur.com/sQoWp.png" alt="enter image description here"></p>
  
  <p>I know using auto layout constraints works fine with UITableViewCells and dynamic resizing. I have no idea why it's not working in this case. Does anyone have any ideas?</p>