0

This is my code,I have created a cusom UITableViewCell and uses SDWebImage to load image asynchronously. But it is not working. When I use default cell like this "cell.imageView setImage..." it works fine,I don't know why?

DiscoutCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
[cell.goodsImageView setImageWithURL:url placeholderImage:[UIImage imageNamed:@"zanwutupian.png"]];
That1Guy
  • 7,075
  • 4
  • 47
  • 59
Jackie
  • 385
  • 1
  • 3
  • 10
  • 1
    Can you let us know how you are initializing the cell in cellForRowAtIndexPath: method? If you are using "xib", you should load the xib from bundle. – Anupdas Mar 05 '13 at 01:59
  • if (!nibsRegistered) { UINib *nib = [UINib nibWithNibName:@"DiscoutCell" bundle:nil]; [tableView registerNib:nib forCellReuseIdentifier:cellIdentifier]; nibsRegistered = YES; } – Jackie Mar 05 '13 at 02:12
  • I also have some label to be displayed in the cell and it is ok.The only problem is the image – Jackie Mar 05 '13 at 02:13
  • It may sound silly, did you connect the IBOutlet of imageView? – Anupdas Mar 05 '13 at 02:18
  • Is the placeholder image visible? – Anupdas Mar 05 '13 at 02:21
  • Maybe there is something error with the image url. Does the url works? – fannheyward Mar 05 '13 at 02:24
  • NO,even the placeholder image is not visible,I think the problem is that imageview,but I just don't know how to solve it. – Jackie Mar 05 '13 at 02:31
  • Solved I find I don't link that imageView to my IBOutet imageview,I'm so sorry for wasting your time,it's my fault.I'm so careless!Anyway,thanks very much! – Jackie Mar 05 '13 at 02:39

1 Answers1

0

Solved I find I don't link that imageView to my IBOutet imageview,I'm so sorry for wasting your time,it's my fault.I'm so careless!Anyway,thanks very much!

Jackie
  • 385
  • 1
  • 3
  • 10