I create a UILabel object in viewDidLoad of UIViewController like below:
I set the tt.backgroundColor is nil。 but when UILabel appeared, the backgroundColor is black ! and I adjust tt.text=@"abcd中"。 the backgroundColor is working and the color is clear。
PS:
Xcode version :11.3 (11C29)
iPhone11 simulator。
Code Block language -(void) viewDidLoad { [super viewDidLoad]; UILabel *tt = [UILabel new]; tt.text = @"abcd"; tt.frame = CGRectMake(100, 100, 100, 50); tt.backgroundColor = nil; [self.view addSubview:tt]; }
I set the tt.backgroundColor is nil。 but when UILabel appeared, the backgroundColor is black ! and I adjust tt.text=@"abcd中"。 the backgroundColor is working and the color is clear。
PS:
Xcode version :11.3 (11C29)
iPhone11 simulator。