UIWebView使用回调加载图像 [英] UIWebView loading image using a callback

查看:52
本文介绍了UIWebView使用回调加载图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何从服务器为我的UIWebView请求html页面的同时,使用某种类型的回调功能来请求图像.目前,我不知道 UIWebView 如何下载网页上的图像,是否使用回调?它可以接收嵌入式图像数据等吗,我希望有人可以向我解释这些选项.

我已经遍历了苹果文档的URLConnection,NSURLConnection,UIWebView等,并且没有关于UIWebView加载图像的不同方式的说明,所以我希望有人可以向我解释UIWebView可以请求显示图像的不同方式以及我应该在服务器端注意的内容,以使事情变得更容易.

所以这个问题的原因是,我需要决定如何最好地将图像存储在服务器上,或者其他诸如将图像嵌入html响应,是否支持回调等更好的方法.

任何帮助将不胜感激.

解决方案

它只是加载图像.没有回调,委托,通知或其他内容.如果您的图片可通过浏览器访问,则将由UIWebView下载并显示.

I would like to know how to request images using some type of callback feature while requesting html pages from my server for my UIWebView. Currently I have no idea how a UIWebView downloads the image thats on a webpage, dose it use a callback? can it receive embedded image data etc, I am hoping someone can please explain the options open to me.

I have looked all through apple docs URLConnection, NSURLConnection, UIWebView etc and there is no explanations on the different ways UIWebView load images, so I am hoping someone can help explain to me the different ways a UIWebView can request the images for display and what I should look out for on my server end to make things easier.

So the reason for this question is that I need to decide on how best to store the images on my server or other things like is it better to embed the images in the html response, are callbacks support etc etc..

any help would be appreciated.

解决方案

It's just load images. No callbacks, delegates, notifications or smth. If your image is reachable via browser, it'll be downloaded and presented by UIWebView.

这篇关于UIWebView使用回调加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆