When I load an external HTML with SWF embedded, it work in UIWebView.
When I try to add all files in Xcode, and load the UIWebView local, nothing appears, but I know it tried to load ...
-The Code:
NSString *filePath =
[[NSBundle mainBundle] pathForResource:@"vimmar" ofType:@"html"];
NSData *htmlData = [NSData dataWithContentsOfFile:filePath];
if (htmlData)
{
NSBundle *bundle = [NSBundle mainBundle];
NSString *path = [bundle bundlePath];
NSString *fullPath = [NSBundle pathForResource:@"vimmar"
ofType:@"html" inDirectory:path];
[pagina_web_local loadRequest:[NSURLRequest requestWithURL:
[NSURL fileURLWithPath:fullPath]]];
}
else
{
NSLog(@"No data for you...");
}
-And here HTML
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Default</title>
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<style type="text/css">
@media only screen and (min-device-width: 800px) { html { overflow:hidden; } }
* { padding: 0; margin: 0; }
html { height: 100%; }
body { height: 100%; overflow:hidden; }
#container { height: 100%; min-height: 100%; width: 100%; margin: 0 auto; }
</style>
</head>
<body>
<script src="swfobject/swfkrpano.js"></script>
<div id="container">
<div id="panoDIV" style="height:100%;">
<script>
embedpano({target:"panoDIV",swf:"vimmar.swf"});
</script>
<noscript>
<div id="tour">
<object width="100%" height="100%">
<embed src="vimmar.swf" width="100%" height="100%" allowFullScreen="true"></embed>
</object>
</div>
</noscript>
</div>
</div>
</body>
</html>
Do not know if it has to do with the fact that the apple does not accept SWF. But if not, why are carried outside? Do you agree?
Not for lack of adding the files. JS or other, as I found here a staff with trouble loading. JS was read and useful, but have not found SWF.
Thank you.