Question

I am trying to load images from url with EGOImageView From here by using custom cells . I had tried with

-(void)configureReviewCell:(YDRecentReviewCell*)mycell atindexpath:(int)indexPath
{

    NSURL* url = [NSURL URLWithString: tempPlace.placeProfileImageUrlString];
    NSURL* bijUrl = [NSURL URLWithString: tempPlace.bizlogo];
 EGOImageView*  urlimage = [[EGOImageView alloc] initWithPlaceholderImage:[UIImage imageNamed:@"placeholder.png"]];
    urlimage.delegate=self;
    urlimage.imageURL = bijUrl;

    mycell.topimage =urlimage;

}

but image not showing on table view however if I add it as a subview on cell contentview ( [mycell.contentView addsubView:url image])image appears . what i am doing wrong . Any help would be appreciated.

Was it helpful?

Solution

Please check this line

mycell.topimage = urlimage;

Make sure that topimage is added as a subview to mycell's contentView.

This seems like the fix-

mycell.topimage = urlimage;
[mycell.contentView addSubview:mycell.topimage];

I presume that mycell.topimage is nil before you assign any urlimage to it. And there is no variable added as subview to mycell.contentView before this assignment.

So you need to add this as subview to mycell.contentView after assignment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top