简体   繁体   English

Web 页面按钮单击 UIWebView 在模拟上工作,而不在 iOS 设备上工作

[英]Web page button click in UIWebView works on Simulate not on iOS device

I have what appears to be an interesting problem.我有一个看起来很有趣的问题。 I have a UITableView where one of the table view cells contains a UIWebView.我有一个 UITableView,其中一个表视图单元格包含 UIWebView。 In the UIWebView I place some HTML code.在 UIWebView 中,我放置了一些 HTML 代码。 On the simulator I can click on the webpage buttons and the page reacts correctly to the click.在模拟器上,我可以点击网页按钮,页面对点击做出正确反应。 But when I run the program on the device, the buttons stop reacting as they should.但是当我在设备上运行程序时,按钮停止了应有的反应。

Everything is fairly straight forward and simple.一切都相当简单明了。 I have a UITableViewCell that holds a UIWebView.我有一个包含 UIWebView 的 UITableViewCell。 When the UITableViewCell is loaded the UIWebView receives the HTML in the loadString:baseURL: method.当 UITableViewCell 被加载时,UIWebView 在 loadString:baseURL: 方法中接收到 HTML。

Any ideas what might be going on?任何想法可能会发生什么?

Thanks for any help!谢谢你的帮助! Rob

It seems that it is trying to load the HTML synchronously so the network latency on the device might have been long enough to hang the thread.它似乎正在尝试同步加载 HTML,因此设备上的网络延迟可能已经足够长以挂起线程。 By the way you might wanna tag this question with iphone so people would know you are talking about Objective-C iPhone SDK顺便说一句,您可能想用 iphone 标记这个问题,这样人们就会知道您在谈论 Objective-C iPhone SDK

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM