创建一个label
Uilabel * tagLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.frame.size.width/2-50, 165, 100, 30)];
设置自定义颜色 rgb值可以使用使用测色计测出数值
tagLabel.backgroundColor =[UIColor colorWithRed:49/255.f green:208/255.f blue:202/255.f alpha:1];
设置字体居中 其他靠左靠右可以直接查看属性
tagLabel.textAlignment = NSTextAlignmentCenter;
设置圆角
tagLabel.layer.cornerRadius = 15;
[tagLabel setClipsToBounds:YES];
当然要把它加入到view中[self.View addSubview:tagLabel];