How do i insert UIImage on UIWebView

2 Solutions Collect From Internet About “How do i insert UIImage on UIWebView”

Thanks Thomas for you response, i don’t know if it works because i managed to do it myself now..

Been decoding the GIFs for more then a week now and still with no succes so i went from UIImageView to UIWebView and the following code made it work..

[self.webView loadData:gifData MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];

I’ve not tried it, but something like this :

NSString *html = [NSString stringWithFormat:@"<img src='data:image/gif;base64,%@' />", [myData base64Value];
[myWebView loadHTMLString:html baseURL:nil]

You’ll need a NSData category that implements converting to base64, that shouldn’t be difficult to find (I’ve bookmarked

edit: another way is to decode the gif, so you have an NSArray of the frames :