I have NSMutableArray , which contains string, datetime, and UIImage
. everything is show in my UITableView without image.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier =@"Cell";
CustomCell *customCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
contact = res[indexPath.row];
NSString *titleNews = contact[@"title"];
NSString *newsDateTime = contact[@"datetime"];
NSString *NewsImageName = contact[@"featured_image"];
UIImage *image = [UIImage imageNamed:NewsImageName ];
customCell.customFirstNameLabel.text = titleNews;
customCell.customLastnameLabel.text = newsDateTime;
customCell.customImageView.image =image;
return customCell;
}
i am trying show data from here .
{
datetime = "2015-09-10 13:35:33";
"featured_image" = "http://198.72.115.125/~pratidin/assets/news_images/2015/09/10/thumbnails/bdp-001.jpg";
"item_id" = 102235;
"main_news_url" = "http://198.72.115.125/~pratidin/api/detailnews/102235";
"main_url" = "http://198.72.115.125/~pratidin/api/topnews";
summery = "\U0997\U09a4 \U0995\U09af\U09bc\U09c7\U0995\U09ae\U09be\U09b8 \U09af\U09be\U09ac\U09a4 \U09ae\U09cb\U09ac\U09be\U0987\U09b2\U09aa\U09cd\U09b0\U09c7\U09ae\U09c0\U09b0\U09be \U0985\U09aa\U09c7\U0995\U09cd\U09b7\U09be\U09af\U09bc…";
title = "\U098f\U09ac\U09be\U09b0 \U0986\U0987\U09ab\U09cb\U09a8 \U09ec\U098f\U09b8 \U0993 \U09ec\U098f\U09b8 \U09aa\U09cd\U09b2\U09be\U09b8";
}