I have a strange problem with UIWebView\'s loadHTMLString, where it would only display a blank view when I called loadHTMLString with my content HTML string. It does not matter
I just had the same problem, and being a n00b, i found myself surprised that the problem was solved when i DID NOT DO
webview = [[UIWebView alloc]init];
but instead, since it was already wired up as an outlet, i just had to call
[webView loadHTMLString:mystring baseURL:nil];
After a bit of detective work, I found out that returning NO in the delegate function
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
will reject loadHTMLString requests. Returning YES solved my problem.
From your initialization code for the UIWebView
, it looks like you're adding wcbbcPanel
at a position that would be off the screen. Try this instead:
wcbbcPanel = [[WarrantsAndCbbc alloc] initWithFrame:CGRectMake(0, 0, 320, 230)];