【发布时间】:2012-07-25 21:58:57
【问题描述】:
我正在尝试让 iTunes 从加载在 UIWebView 中的 html 页面启动。
使用 Apple 文档中的示例
<a
href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=156093464&id=156093462&s=143441">
<img height="15" width="61" alt="Randy Newman - Toy Story
- You've Got a Friend In Me" src="http://ax.phobos.apple.com.edgesuite.net/images/
badgeitunes61x15dark.gif"></img> </a>
当我点击按钮 didFailLoadWithError: 将被调用WebKitErrorDomain 101。
(shouldStartLoadWithRequest: 对任何请求都返回 YES)
在浏览器中加载的相同 html 页面可以工作。
(该代码实际上还有另一个问题,请参阅此链接 Remote image doesn't get displayed in html page displayed in UIWebView
但是在改成这个之后它仍然不能在 UIWebView 中工作,但在浏览器中可以工作
<a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=156093464&id=156093462&s=143441">
<img height="15" width="61" src="Btn_Go.png""></img>
</a>
【问题讨论】:
-
天哪,我笑
shouldShartLoadWithRequest:的时间太长了。 -
无论如何,你能发布你的按钮代码吗?