现在的位置: 首页 > 综合 > 正文

iPhone开发之webview 拖动和显示本地图片的几组代码

2013年04月29日 ⁄ 综合 ⁄ 共 446字 ⁄ 字号 评论关闭

NSString *file = [[NSBundle mainBundle] pathForResource:@”7,0″ ofType:@”png”];

NSString *url = [NSString stringWithFormat:@"

<html>

<head>

<script type=\"text/javascript\">document.ontouchmove = function(e){ e.preventDefault();} </script>

</head>

<style>a,a:link,a:visited,a:hover,a:active {text-decoration:none;color:blue;}</style>

<body>

<a href='http://www.minroad.com/'>linklinklink</a>

<img src='file://%@'>

</body>

</html>",file];

[webview loadHTMLString:url baseURL:nil];

抱歉!评论已关闭.