Question

I'm doing this :

(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath {

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {

    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle 

reuseIdentifier:CellIdentifier];

    cell.imageView.image = [UIImage imageNamed:[[self.articlesArray 

objectAtIndex:indexPath.row]objectForKey:@"images"]];

  //  [cell.imageView setImageWithURL:[NSURL URLWithString:[[self.articlesArray 

objectAtIndex:indexPath.row]objectForKey:@"images"]]];


}

return cell;

}

I'm doing this:

cell.imageView.image = [UIImage imageNamed:[[self.articlesArray 

objectAtIndex:indexPath.row]objectForKey:@"images"]];

But nothing is showing in my UITableViewCell.

And I want to show image in left of tableViewCell on left side ,

Please tell me how can I do this.

No correct solution

OTHER TIPS

I've done it by myself.

here is the solution, and it works perfectly.

NSData* imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString: 

[[self.articlesArray objectAtIndex:indexPath.row]objectForKey:@"images"]]];

UIImage* image = [[UIImage alloc] initWithData:imageData];

cell.imageView.image =image;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top