Reputation:
I added a rightBarButton and I'd like to have that button hide the TableView and show my UIWebView, but I am not seeing the web view.
UITableViewController
viewDidLoad:
mWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 380)];
[mWebView loadHTMLString:@"<html><body>Testing</body></html>" baseURL:nil];
mWebView.hidden=YES;
[self.view addSubview:mWebView];
onButton:
mWebView.hidden = NO;
self.tableView.hidden=YES;
The tableView disappears, but all I get is a white screen instead of the expected 'Testing'
Upvotes: 0
Views: 349
Reputation:
Try [webview setBackGroundColor: [UIColor clearColor]];
and [webview setOpaque: NO];
Upvotes: 0
Reputation: 3012
You may need to add [mWebView setNeedsDisplay]
and possibly [self.tableView setNeedsDisplay]
.
Upvotes: 1