setting transparent background for UILabel for iphone application

天涯浪子 提交于 2019-11-28 10:45:29
oden

Change the following line:

label.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.0];

to this:

label.backgroundColor = [UIColor clearColor];

For those using Xamarin.iOS it's obviously:

UILabel myLabel = new UILabel();
myLabel.Text = "Hello world!";
myLabel.BackgroundColor = UIColor.Clear;
[label setBackGroundColor:[UIColor clearColor]];

To set the clearBackGround Color for a label

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!