iPad3 renders white cell label

185 Views Asked by At

I have splitviewcontroller which contains tableview and detailview. whatever item is selected from tablview related description will be shown in detailview.

when user selects any cell from tableview, i load the appropriate view in detailview and there is another function also, each and every detailview has a "NEXT" button which allows user to navigate to next view. it means when user presses the next button and if current selected cell no. is 2, then it will select 3rd cell and load the 3rd detailview. My problem is that everything works very smoothly in iPad1 and iPad2. but in Retina display iPad3 , when i am in first cell and by pressing the "Next" button , i moved to 2nd cell and related detail view at that time my first cell textlabel became white colored as shown in image. you can also see the title of the cell "Location", if you see it properly.

image

Following is the code which i used when user presses the NEXT button.

NSIndexPath *ipath = [NSIndexPath indexPathForRow:MenuCustmerInfoRow inSection:MenuSection];

[rvc.tableView selectRowAtIndexPath:ipath
                 animated:NO
           scrollPosition:UITableViewScrollPositionNone];

What could be the reason for this ? This only happens in iPad 3 and this only happens for the first cell of the tableview, all other cells are working well.
Any help would be greatly appriciated !

Thanks
Neal

1

There are 1 best solutions below

0
On

I am going to file an Apple bug but here is the issue, the text label's background is being turned white on deselection, so do this

-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath {

    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    //forced clear color due to textlabel turning white after deselect
    [cell.textLabel setBackgroundColor:[UIColor clearColor]];
}