-2
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"HistoryCell";
//UITableViewCell *cell = (TableViewCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
UITableViewCell * Cell=[tblView dequeueReusableCellWithIdentifier:cellIdentifier];
if (Cell == nil)
{
Cell = [[TableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
Cell.selectionStyle = UITableViewCellSelectionStyleBlue;
}
myString=[arr objectAtIndex:indexPath.row];
NSLog(@"String %@",myString);
//NSString *newString = [myString stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
NSURL *imageURL =[NSURL URLWithString:myString];
NSData *image = [[NSData alloc] initWithContentsOfURL:imageURL];
UIImageView *imageview=[[UIImageView alloc]initWithFrame:CGRectMake(00, 00, 80, 80)];
imageview.image=[UIImage imageWithData:image];
[Cell addSubview:imageview];
//cell.imageView.image=[UIImage imageWithData:image];
return Cell;
}
问题添加更多说明我没有得到你想要什么确切地说。 – Rushabh 2014-10-10 05:46:46
告诉我你的数组,所以我可以理解 – NiravPatel 2014-10-10 06:08:17
正如@NiravPatel所说,请显示你的数组的内容 – 2014-10-10 10:26:07