Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 UITableView: is it a bug or is it me?

Please see the attached image. In table views in iOS 7, UIKit draws a thin gray vertical line between the accessory view and the reordering control. However, when the table view is scrolled this line is not drawn in some cells. It is absent in cells 1, 2 and 8 in the attached image. Why is this? How can I fix it?

enter image description here

like image 376
Steveo Avatar asked Mar 22 '14 01:03

Steveo


2 Answers

I'm having the same issue on an iphone 6s plus and solved it setting the backgroundColor of the cell's textLabel to clearColor

cell.textLabel.backgroundColor = [UIColor clearColor];

Looking at my problem with reveal showed me that the right border of the label was drawing this vertical line. enter image description here

like image 101
Louis de Decker Avatar answered Sep 28 '22 17:09

Louis de Decker


You can try this using

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;
{
    cell.backgroundColor=[UIColor clearColor];
    cell.backgroundView=nil;
}

this method might be helpful or something that might be in you cell like some image or what.? or you can check that using allocation of cell like this place if(cell==nil) instead if(1)and alloc cell eveytime

like image 27
Sam Avatar answered Sep 28 '22 18:09

Sam