iOS 如何设置再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];
阅读 6.6k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进