Here i want to display image url to the image view,
NSData *imageData= [[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:[sharedDelegate.getHotListArray objectAtIndex:indexPath.row]]]objectForKey:@"image"];
cell.userGetHotImgView.image=[UIImage imageWithData:imageData];
Here i got error like dictionary length ? Please help me how can i pass the array of image url to nsdata ?
Thank you in-advance.
In the code you have posted you are creating an NSData object and then calling objectForKey:
on it. This is not a method of NSData.
Just assign the NSData you created to your imageData variable.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.