Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 26th, 2012  |  syntax: Objective C  |  size: 0.74 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if (indexPath.section == 1 && indexPath.row == 0) {
  2.         UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WebViewCell"];
  3.         if (cell == nil) {
  4.             cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"WebViewCell"] autorelease];
  5.        
  6.             UIWebView *_webView = [[UIWebView alloc] initWithFrame:cell.contentView.bounds];
  7.             _webView.backgroundColor = [UIColor clearColor];
  8.             _webView.opaque = NO;
  9.             _webView.delegate = self;
  10.             _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
  11.  
  12.             [cell.contentView addSubview:_webView];
  13.             [_webView release];
  14.         }
  15.        
  16.         return cell;
  17.     }