I have added an UILabel to a custom cell's contentView. I met with a strange side effect. On the right border there is a gray edge. I don't know why. I just added an ordinary UILabel, I have done nothing else.
UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
label.text = @"value1";
label.textAlignment = UITextAlignmentCenter;
[self.contentView addSubview:label];
- (void)layoutSubviews
{
UILabel *label = [self.contentView.subviews objectAtIndex:i];
label.frame = CGRectMake(…);
}
UIView
underneath theUILabel
. I then changed thebackgroundColor
on theUIView
and kept theUILabel
clearColor
– Anschauung