How can I remove UILabel's gray border on the right side?

I know this is an old question but I have just come across this exact same problem, so I thought I could help someone else looking.

For me the problem was that I had floating numbers in my frames. The following fixed it for me:

CGRectIntegral( myLabel.frame )

I don't know the reason, but the solution is to get rid of that gray edge to set the background color of the cell to clearColor.

label.backgroundColor = [UIColor clearColor];


First of all, you need to set:

[label setBackgroundColor:[UIColor clearColor]];

Next, set color that you want:

[label layer] setBackgroundColor:[UIColor redColor].CGColor];