UIWebView: Images are not updating

╄→гoц情女王★ 提交于 2019-12-25 01:24:04

问题


I am using UIWebView to load HTML Page. From that HTML I have generated PDF file. My PDF file content changes as per the HTML data changes. when I change the Signature(Image) of the user in application respective PDF will not change to new signature. It shows the previous signature.

How can I reload that UIWebView?


回答1:


If you are using same url with updated content use this.

UIWebView*  webV=[[UIWebView alloc]init];

NSString* htmlString= @"Loading...";

[webV loadHTMLString:htmlString baseURL:nil];

[webV loadRequest:[NSURLRequest requestWithURL:mainURL]];



回答2:


[webView reload] should do the trick.

If you are using a new URL you can use [webView loadRequest:[NSURLRequest requestWithURL:theURL]];



来源:https://stackoverflow.com/questions/10578275/uiwebview-images-are-not-updating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!