2015-10-14 86 views

回答

5

這應該做的伎倆:

yourLabel.backgroundColor = UIColor(patternImage: UIImage(named: "backgroundImage")!) 
+0

可能的複製謝謝@Dejan Skledar .. –

1

的控制的UILabel沒有background imageimage財產。

,如下圖所示,您可以使用backgroundColor屬性設置圖像UILabel

cell.lblNumber!.text = "" 
cell.lblNumber!.backgroundColor = UIColor(patternImage: UIImage(named: "OK")!) 

設置爲空,因爲它會顯示在它上面的圖像和文本。

Screenshot for solution

+0

謝謝你的答案.. @ Jayprakash Dubey –