- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
// intercepting web click in the webView
NSLog(@"%@, %i", [request.URL absoluteString], navigationType);
}
Don’t forget to set <UIWebViewDelegate>
Calling JS from webViewDidFinishLoading, modifying paths to local. Before that all the images had to be stored into the local path.
http://iphoneincubator.com/blog/windows-views/uiwebview-dynamically-modify-html-documents
Interesting direction, but still looking for an elegant way to mix external sites (HTML) with local content (images, scripts…)
MetaTags.html
ConfiguringWebApplications.html
<meta name=”apple-mobile-web-app-capable” content=”yes”>
<meta name=”apple-mobile-web-app-status-bar-style” content=”none”>
<meta name = “viewport” content = “width = device-width”>
<meta name = “viewport” content = “initial-scale = 1.0, user-scalable = no”>
<link rel=”apple-touch-icon” href=”/custom_icon.png”/>
<link rel=”apple-touch-startup-image” href=”/startup.png”>