i have project with TableView, gallery and others. So i need when i open my app all images from JSON must to be save, and when i open app without internet my images must show. How it's create? What i must to do? Also i have part of my code for show images in tableViewCell to TableView:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
CellForNewsContent *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
CBAutoScrollLabel *captionLabel = [[CBAutoScrollLabel alloc] initWithFrame:CGRectMake(85, 10, 210, 20)];
UILabel *detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(85, 39, 220.0, 20.0)];
detailLabel.tag = 2;
captionLabel.tag = 1;
captionLabel.text = [_news[indexPath.row] valueForKey:@"title"];
captionLabel.scrollSpeed = 7;
[cell addSubview:captionLabel];
[cell addSubview:detailLabel];
UILabel *detailShow = (UILabel*)[cell viewWithTag:2];
detailShow.text = [[_news objectAtIndex:indexPath.row]objectForKey:@"date"];
[cell.imageView setImageWithURL:[NSURL URLWithString:[[_news objectAtIndex:indexPath.row] valueForKey:@"smallimg"]] placeholderImage:[UIImage imageNamed:@"[email protected]"]];
Thanks.
Added JSON for image:
sliderurl : "http://site/m/miss/load/slider/3c01c445e13582c874bc56619ca47bb8.png"
1
sliderurl : "http://site/m/miss/load/slider/ba17268fa8d7d0f36fa35055960528fd.png"
2
sliderurl : "http://site/m/miss/load/slider/031b22e15228800b22105d4b97043681.png"
3
sliderurl : "http://site/m/miss/load/slider/bf484ddd41f02f8b762b517557760bfb.png"
4
sliderurl : "http://site/m/miss/load/slider/6718b988c4cf5cfb9f40219833d7118f.png"
5
sliderurl : "http://site/m/miss/load/slider/8593df80af29fe8014f9fc176991cb07.png"
6
sliderurl : "http://site/m/miss/load/slider/bf80cff0b085c63ff0416f7118659df6.png"
7
sliderurl : "http://site/m/miss/load/slider/45fbe8a52d174e145b3e98dbf9fa960c.png"