2012-04-14 87 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"]]; 

我引導您完成使這種情況發生的步驟,但以供將來參考,你不會只問別人做你的工作,你得到這個網站很好的反應。