2012-04-14 89 views
0

我想要得到一个UILabel具有与此图像中相同的背景和字体。设置自定义UILabel

enter image description here

+3

我想要一枚月亮火箭! – Till 2012-04-14 19:52:34

+3

这不是[Howcast](http://m.howcast.com/promos/iphone),[你有什么试过](http://mattgemmell.com/2008/12/08/what-have-you -tried /)? – CodaFi 2012-04-14 20:36:04

回答

2

简单,首先拖放标签。

enter image description here

选择您的标签,那么你可以通过执行以下操作调整它的属性。

定义自定义字体颜色。

enter image description here

选择,你觉得你在找什么最匹配的字体。

enter image description here

更改背景颜色。

enter image description here

或用于标签背景,你可以通过设置图像作为像这样的背景下做到这一点的渐变效果。

theLabel.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"blah"]]; 

我引导您完成使这种情况发生的步骤,但以供将来参考,你不会只问别人做你的工作,你得到这个网站很好的反应。