How do I convert the following to use 'loadRequest' instead of 'loadHTMLString'?
I need to add a HTTP header and the only way I have found is to use loadRequest with a NSMutableURLRequest as explained here.
myHTMLContent = [NSString stringWithFormat:@"<head>%@</head><body>%@</body>", @"<link href='styles.css' rel='stylesheet' type='text/css'>", htmlFromPrevVar];
NSString *myPath = [[NSBundle mainBundle] resourcePath];
NSURL *myBaseURL = [NSURL fileURLWithPath:myPath];
[self.myUIWebView loadHTMLString:myHTMLContent baseURL:myBaseURL];
loadRequest:that is coming from the file system? Do you want to actually load the HTML from a network resource (i.e. a web page?)<img>tag in it that requires an OAuth header? And you need some way to load the local html (via file or in-memory) via a NSURLRequest so you can add the authentication header.