title: Unexpected behaviour when adding subviews to UICollectionViewCell
body: <p>I'm currently facing a strange issue with UICollectionViewCell when adding subviews to it but only during certain situations.</p>
  
  <p>Here is the scenario:</p>
  
  <p>I have a "container" view which conforms to a very specific protocol (ADGControl) with a nested view, typically a UIKit control subclass I.e MyCustomTextField : UITextField for custom controls.</p>
  
  <p>The "container" view exposes a property called "innerControlView" which holds a strong reference to the custom control which is what I'm trying to add as a sub view to the cell's content view.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
     FormControlCollectionViewCell *cell = [self.formCollectionView dequeueReusableCellWithReuseIdentifier:@"formControlCell" forIndexPath:indexPath];
     NSArray *sectionContents = [_controlList objectAtIndex:[indexPath section]];
  
     // This works
     //UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 315.0f, 30.0f)];
     //textField.borderStyle = UITextBorderStyleLine;
     //[cell.controlView addSubview:textField];
  
     // This doesn't (see the behaviour in video clip)
     id &lt;ADGControl&gt; control = [sectionContents objectAtIndex:[indexPath row]]; // The container view I'm referring to
     [cell.contentView addSubview:(UIView *)[control innerControlView]]; // [control innerControlView] is the typical UIKit control subclass for custom controls. In this example it will be a UITextField
  
     return cell;
  }
  </code></pre>
  
  <p>As you can see in the code comments above, whenever I try to add just a UIKit control (textField) directly, it works just fine. However, as soon as I try to add my custom control ([control innerControlView] I get the unexpected behaviour as seen in the video clip here: <a href="http://media.shinywhitebox.com/ryno-burger/ios-simulator-ios-simulator-ipad-ios-a" rel="nofollow">http://media.shinywhitebox.com/ryno-burger/ios-simulator-ios-simulator-ipad-ios-a</a></p>
  
  <p>The above link is just a short 23 seconds video clip to better demonstrate the "unexpected behaviour" that I get.</p>
  
  <p>If anybody can point out what I'm doing wrong of what the issue might be I will be grateful.</p>
  
  <p>Thanks</p>