search

Home  >  Q&A  >  body text

objective-c - iOS How to set the text to be opaque when setting the background transparency of the UIlabel

UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(0+20, UIViewHeight - 20, UIViewWidth, 20)];

leftLabel.textColor = [UIColor whiteColor];

// leftLabel.backgroundColor = [UIColor lightGrayColor];

leftLabel.backgroundColor = [[UIColor blackColor]colorWithAlphaComponent:0.7f];
伊谢尔伦伊谢尔伦2824 days ago417

reply all(0)I'll reply

No reply
  • Cancelreply