swift UILabel

前端之家收集整理的这篇文章主要介绍了swift UILabel前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

var myLoadingView:UILabel!

myLoadingView = UILabel(frame:CGRectMake(self.view.frame.size.width/2-50,self.view.frame.size.height/2-50,100,50))

myLoadingView.text = mymsg

myLoadingView.textColor =UIColor.redColor()

myLoadingView.backgroundColor =UIColor.blackColor()

myLoadingView.alpha =0.8

myLoadingView.layer.cornerRadius =4.0

myLoadingView.hidden =false

myLoadingView.textAlignment=NSTextAlignment.Center//内容水平居中

self.view.addSubview(myLoadingView);

猜你在找的Swift相关文章