title: UITableViewCell custom selectedBackgroundView background is transparent
body: <p>I have the following code that creates a <code>UIView</code> that I assign to my <code>UITableViewCell</code>'s <code>selectedBackgroundView</code> property. Everything works as expected, with the exception of the subview's background, which is transparent.</p>
  
  <p>I use the same code to create a custom view that I assign to <code>backgroundView</code>, and that works fine.</p>
  
  <p>What is causing that subview to be transparent for <code>selectedBackgroundView</code>, and how can I avoid that?</p>
  
  <pre class="lang-m prettyprint-override"><code>- (UIView*) makeSelectedBackgroundView
  {
      // dimensions only for relative layout
      CGRect containerFrame = CGRectMake(0, 0, 320, 40);
  
      UIView* containerView = [[UIView alloc] initWithFrame:containerFrame];
      containerView.autoresizesSubviews = YES;
  
      // dimensions only for relative layout
      CGRect subframe = CGRectMake(5, 5, 310, 30);
      UIView* subview = [[UIView alloc] initWithFrame:subframe];
  
      subview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
  
      subview.backgroundColor = [UIColor redColor];
      subview.layer.cornerRadius = 5;
      subview.layer.borderWidth = 2;
      subview.layer.borderColor = [UIColor greenColor].CGColor;
  
      [containerView addSubview:subview];
  
      return containerView;
  }
  </code></pre>