I have a viewController with a webView where I am displaying a local html file.
The problem is that it takes some seconds before loading therefore I am trying to avoid this waiting time.
The best way I thought so far is the following: as soon as I get into the main page I will start to load the file into the webView, in this way when I will get into the infoViewController with the webView it will be already loaded.
Here is the code:
//mainViewController.m:
tempInfo = [[InfoViewController alloc]initWithNibName:@"InfoViewController" bundle:nil];
[tempInfo.webView123 loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"About" ofType:@"htm"]isDirectory:NO]]];
tempInfo.test =@"test";
As you can see I also added a test variable, when I get into the infoViewController the webView is not loaded but the test variable changed value. This means that it is passing the value for the test variable but it is not loading the html file into the webView.
Any idea?