问题
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