gpt4 book ai didi

iphone - 更改 UILabel 背景颜色

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:53:45 24 4
gpt4 key购买 nike

我的代码是

UILabel *pTeamAlreadybl=[[UILabel alloc]initWithFrame:CGRectMake(110, 275,180,30)];

pTeamAlreadybl.text=@" Team already?";
pTeamAlreadybl.font=[UIFont boldSystemFontOfSize:16];
pTeamAlreadybl.textAlignment=UITextAlignmentLeft;
pTeamAlreadybl.textColor=[UIColor colorWithRed:61.0/255.0 green:61.0/255.0 blue:61.0/255.0 alpha:0.6];
pTeamAlreadybl.shadowColor = [UIColor colorWithWhite:1.0 alpha:0.7];

如何更改标签的背景颜色?

最佳答案

你错过了

pTeamAlreadybl.backgroundColor=[UIColor anycolor];

写这段代码

关于iphone - 更改 UILabel 背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6955339/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com