title: How to remove a subview from a cell's content view?
body: <p>I have added a UIWebview to the cell's content view</p>
  
  <pre><code>UIWebView *webview = [UIWebView alloc]init];
  [cell.contentView addSubview:webview];
  </code></pre>
  
  <p>Now I intend to remove 'webview' from the cell's contentview.</p>
  
  <p>Can I do the following?</p>
  
  <p><strong>Method 1:</strong></p>
  
  <pre><code>[webview removeFromSuperview];
  </code></pre>
  
  <p>Or do I really need to loop through all the subviews of the contentview before removing it?</p>
  
  <p><strong>Method 2:</strong></p>
  
  <pre><code>for (UIView *subview in [self.contentView subviews]) 
  {
      if ([subview isKindOfClass:[UIWebView class]]) 
      {
          [subview removeFromSuperview];
      }
  }
  </code></pre>
  
  <p>I tried method 1 and it didn't seem to work, am not sure if I am missing something or if method 2 is the only way to go</p>