as shown in the figure: because label1 and label2 are in the same position, there will be a deviation in the upper label2 color display. Normally, it should be the label3 display effect
UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(50, 100, 100, 20)];
label1.text = @"";
label1.textColor = [UIColor redColor];
[self.view addSubview: label1];
UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(50, 100, 100, 20)];
label2.text = @"";
label2.textColor = [UIColor whiteColor];
[self.view addSubview: label2];
UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(150, 100, 100, 20)];
label3.text = @"";
label3.textColor = [UIColor whiteColor];
[self.view addSubview: label3];