gpt4 book ai didi

ios - 在swift 3中将色调颜色设置为图像

转载 作者:行者123 更新时间:2023-11-29 11:39:02 25 4
gpt4 key购买 nike

<分区>

我有以下代码在 uilabel 的右侧显示图像,目前我的 uilabel 的颜色是黑色,但我想知道如何将图像的颜色更改为绿色

我的代码:

let image:UIImage=UIImage(named:"ic_premium")!
let attachment = NSTextAttachment()
attachment.image=image
attachment.bounds = CGRect(x: 0, y: -3, width: 15, height: 15)
let attributedString = NSMutableAttributedString(string: item_empresa[indexPath.item].nombre_emp!)
attributedString.append(NSAttributedString(attachment: attachment))
cell.lbl_nombreEmpresa.attributedText = attributedString

提前致谢

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com