title: UICollectionViewCell dynamic height depending on UITextView font lineHeight
body: <p>I am trying to implement a collection view with cells having a dynamic height.</p>
  
  <p>Some of the collection view cells contains UITextView, the UITextViews have their height configured like this : </p>
  
  <pre><code>    [textViewHeightConstraint setConstant: numberOfRowsToDisplay * [[textView font] lineHeight]];
  </code></pre>
  
  <p>The textview is a subview of a another view which is in a specific .xib, this xib view is added as subview of the cell when the cell is dequeued (when collectionView:cellForItemAtIndexPath: is called).</p>
  
  <p>BUT i need to return the height of the cell in the "collectionView:sizeForItemAtIndexPath:" method where the cell instance is not accessible, so i cannot access the textview : [[textView font] lineHeight] property.</p>
  
  <p>How can i solve that ?</p>
  
  <p>PS : the textview are empty, so the height is not dependent of an NSString on which i can call the sizeWithFont: method, and i cannot hard code the textview height. The "numberOfRowsToDisplay" is retrieved at runtime, and the textView font is not hardcoded too.</p>
  
  <p>EDIT : i already tried to call "dequeueReusableCellWithReuseIdentifier:forIndexPath:" in the "collectionView:sizeForItemAtIndexPath:" method, it creates an infinite loop, as if i was calling "collectionView:cellForItemAtIndexPath:".</p>