Objective-C UITableView cell image
So I have a UITableView of Facebook Friends and for a cell I want to add
the image to it.
When I try the following code:
cell.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:
[NSURL URLWithString: (@"http://graph.facebook.com/shaverm/picture")]]];
Everything works fine. Although that's hardcoding the image destination
but when I do something like this:
cell.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:
[NSURL URLWithString: (@"http://graph.facebook.com/%@/picture",
thisFriend.friendID)]]];
It gives me a warning stating 'Expression result unused' whilst pointing
at the @ symbol before the link.
Any ideas why this is happening?
** EDIT **
I also tried:
cell.imageView.image = [UIImage imageNamed:thisFriend.friendPhoto];
But that's giving me a 'Incompatible pointer types sending UIImage to
parameter of type NSString' warning.
No comments:
Post a Comment