Regarding the images, frequently we download them individually, and merely update the UI as stuff is downloaded, rather than forcing the user to wait for everything to download. Or lazy downloads are nice (such as afforded by UIImageView
category, like SDWebImage's UIImageView+WebCache
), effectively downloading the images as they're needed, that way the user can use the app without needing to wait for everything to download.
Regarding the text, unless they're huge, you can download them together. Rather than zipping a bunch of text files, though, I think post people would be inclined towards some JSON-formatted response that returns the text files in some nice, easy to consume format by your app. There's a point (say, the combined JSON is more than 100k), though, where combining the text files together hits a point of diminishing returns, in which case you might want to pursue individual downloads.
We need more background on what the app does and the breakdown of data (how big are the individual text files, how many, etc.) before providing meaningful counsel. But unless there absolutely no way for the app to function at all until everything is downloaded, I'd be inclined towards separate downloads for images, and some nice JSON-format single feed for the text.
Let's assume for a second that you have some text description of a series of products, an an image associated with each. Then you might have a JSON that looks like:
[
{
"id": 1,
"description": "This product is ...",
"image_url": "http://www.yourserver.com/images/img001.png"
},
{
"id": 2,
"description": "This different product is ...",
"image_url": "http://www.yourserver.com/images/img002.png"
},
{
"id": 3,
"description": "This third product is ...",
"image_url": "http://www.yourserver.com/images/img003.png"
},
{
"id": 4,
"description": "This last product is ...",
"image_url": "http://www.yourserver.com/images/img004.png"
}
]
Your app might download that JSON (in which case it would have all of the text strings and a bunch of image URLs), and then present that in the UI, and where it needs to display the image, use the UIImageView
category of SDWebImage
to update the image
of the UIImageView
like so:
[cell.imageView setImageWithURL:[NSURL URLWithString:imageUrlString]
placeholderImage:[UIImage imageNamed:@"placeholder.png"]];