[英]Not able to set tintcolor to image set as background in a tableview cell
我在為我的uitableviewcells設置為背景的圖像設置色調顏色時遇到了麻煩。
以下是我的代碼:
backgroundImage.image!.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)
cell.backgroundView = backgroundImage
cell.backgroundView!.tintColor = UIColor.blackColor()
圖像顯示正常,沒有添加任何色彩。
任何幫助都非常感謝。
將第一行替換為: backgroundImage.image = backgroundImage!.imageWithRenderingMode(.AlwaysTemplate)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.