Reputation: 51
Images constrain's :
Image is set to scale-fill.
I am using SDWebImage Library to load images from server..
When image is loaded it over lap's the text area which is exactly below my image.
Here are the screen shot's of main layout.. No issues from constrain's found.
Here is the image when it load's look like:
Here is the code:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
cell=[tableView dequeueReusableCellWithIdentifier:@"fiscocustomcell"];
int i = (int) indexPath.row;
Newsletter * newstemp = [newsposts objectAtIndex:i];
//get a dispatch queue
;
cell.Title.text=[newstemp title];
cell.Title.numberOfLines=0;
[cell.Title sizeToFit];
cell.Postedby.text=@"Posted by";
cell.Postedby.numberOfLines =0;
[cell.Postedby sizeToFit];
cell.NewsDesc.text=[newstemp desc];
cell.NewsDesc.numberOfLines=0;
[cell.NewsDesc sizeToFit];
NSURL *urlimage = [NSURL URLWithString:[newstemp imagelink]];
[cell.imageView sd_setImageWithURL:urlimage placeholderImage:[UIImage imageNamed:@"service-1.png"]];
[cell setNeedsDisplay];
[cell layoutIfNeeded];
return cell;
}
I am stucked from last 1 week with this issues used auto resolve constrain's etc as well nothing works.
It should be like this:
Upvotes: 0
Views: 68
Reputation: 51
Solved Problem
The issue is cell.imageView, I am using custom cell so it must be custom uiimage naned there like:
[cell.mycustomimage sd_setImageWithURL:urlimage placeholderImage:[UIImage imageNamed:@"service-1.png"]];
cell.imageView alway's place the image on the right of cell.
Thanks every one hope that bug will never happen's to any one again ever...
Upvotes: 1