I need to set the background of webView at a time when the html has not loaded.
In iOS 5.0 this code is correctly working:
- (void)viewDidLoad
{
[super viewDidLoad];
[webView stringByEvaluatingJavaScriptFromString:@"document.body.style.backgroundColor=\"#41414C\";"];
}
But in iOS 4.2 nothing happening with background.
How can I set background of web View at a time when the html has not loaded?
In my case I used webview:webViewDidFinishLoad method to evaluate javascript. It was working correctly in 4.2 but since I haven't tested it in iOS 5, I am not sure about its working in that version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With