I just made and tested with the emulator a UIWebView that I attached to a controller which displayed a html page.
But when I did the same with the iPad emulator, it didn’t render the html.
I did attach both the iPad and iPhone versions to the same controller. In the controller here is how I render the html:
- (void)viewDidAppear:(BOOL)animated
{
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"premium" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:htmlFile];
NSURLRequest *rq = [NSURLRequest requestWithURL:url];
[theWebView loadRequest:rq];
}
So on the iPad, did I have to drag from the storyboard to the .h file and register another IBOutlet UIWebView that is separate from the iPhone one?
The reason I am confused is that I have some pages of the app like this that I made before which work in iphone and ipad with only one registered IBOutlet UIWebView – but I forgot how I managed to get that to work 🙂
Any tips much appreciated!
For any element you link to an IBOutlet in your iPhone Storyboard, you have to link it’s iPad Storyboard counterpart to the same IBOutlet.