UIlabel设置背景为圆形

直接对label的cornerRadius进行设置 var text = UILabel(frame: CGRectMake(10,30,UIScreen.mainScreen().bounds.size.width - 20,200)) text.text = "背景为圆形 " text.backgroundColor = self.view.background
相关文章
相关标签/搜索