title: add sub views into UICollectionViewCell's contentView via xib or storyboard
body: <p>I know there is a post:<a href="https://stackoverflow.com/questions/14764432/adding-to-uicollectionviewcell-contentview-via-nib">adding to UICollectionViewCell contentView via nib</a> asking this, but the answer is not correct. Dragging a UILabel directly into a cell's xib, the Label will be added into cell itself, not its contentView:</p>
  
  <pre><code>(lldb) po self.subviews
  &lt;__NSArrayM 0x7fa9b1c58a20&gt;(
  &lt;UIView: 0x7fa9b1c77540; frame = (0 0; 64 64); gestureRecognizers = &lt;NSArray: 0x7fa9b1c66260&gt;; layer = &lt;CALayer: 0x7fa9b1c352f0&gt;&gt;,
  &lt;UILabel: 0x7fa9b1c7a880; frame = (0 15; 64 18); text = 'market share'; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = &lt;_UILabelLayer: 0x7fa9b1c6f820&gt;&gt;,
  &lt;UILabel: 0x7fa9b1c77c30; frame = (0 38; 64 22); text = '17.06'; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = &lt;_UILabelLayer: 0x7fa9b1c36fe0&gt;&gt;
  )
  
  
  (lldb) po self.contentView.subviews
  &lt;__NSArray0 0x7fa9b1d02740&gt;(
  
  )
  </code></pre>
  
  <p>This is still true on XCode 7, sample: <a href="https://github.com/liuxuan30/autolayoutProblemOniOS9" rel="nofollow noreferrer">https://github.com/liuxuan30/autolayoutProblemOniOS9</a>. </p>
  
  <p>So I asked it again for a good answer.</p>
  
  <p>The behaviour is different from UITableViewCell, which will show up a contentView in xib directly. Not sure why Apple did this, and saying in UICollectionViewCell doc <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionViewCell_class/" rel="nofollow noreferrer">https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionViewCell_class/</a>:</p>
  
  <p><em>To configure the appearance of your cell, add the views needed to present the data item’s content as subviews to the view in the contentView property. Do not directly add subviews to the cell itself.</em></p>