IKImageBrowserView items image need to download from internet
IKImageBrowserView items image need to download from internet
- Subject: IKImageBrowserView items image need to download from internet
- From: XiaoGang Li <email@hidden>
- Date: Tue, 15 Mar 2011 17:22:21 +0800
I am having trouble with IKImageBrowserView, hope you can give me some
guides to find a best solution.
Some background information here about my application: There is a massive of
graphics on the server site, and have been well organized. On the client
site, the application will show customer our graphic collections with
IKImageBrowserView. So every browser item cell should get its image from our
server site through internet connection, for example, web service. Since
there are too many graphics to be shown, we embed the IKImageBrowserView
into Scroller view, customer can scroll to find the best image they want.
like that:
-(id) imageRepresentation
{
if(image of this item is not exist on local)
{
// detach a new thread to download the image asynchronously, through web
service.
// and save it, then return nil.
}
else
{
// return the image immediately, which have been saved on local disk before.
}
}
This piece of code maybe meaningless for you to review my question, but it
will show you how I get the image for the item cell.
The problem comes: when showing the graphics with the IKImageBrowserView,
all the items, more than the visible items, begin to fetch their images
through web service, this makes my web service too busy to handle so many
requests, especially when the customer scroller the view very fast!
And my requirement like this: We don't want a lot of items to download
images at the same time, we need to control the count and order. And also
when customer scroll the image browser view fast, we should forbid the items
which is not visible now to download the items, And let the visible items
have more higher priority to download the image. Basically, what I am
thinking of, is that how to improve the user experience.
Maybe my question is not very clear, but I will be happy if I can get
questions from you. Thanks.
GuoLiang Li
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden