我不能帮你的故事板,但您可以通过编程这样来做:
先为您的标签现在
yourLabel: UILabel =
{
let label = UILabel()
return label
}()
,有一些文字加粗其余不是,你需要声明一个NSMutableAttributedString,然后将它附加到另一个字符串上,如下所示:
yourLabel: UILabel =
{
let label = UILabel()
let attributedText = NSMutableAttributedString(string: "Your Text Here", attributes: [NSFontAttributeName: UIFont.systemFont(ofSize: 14)])
attributedText.append(NSAttributedString(string: "Your Bold Blue Text Here", attributes: [NSForegroundColorAttributeName: UIColor.blue, NSFontAttributeName: UIFont.boldSystemFont(ofSize: 14)]))
label.attributedText = attributedText
return label
}()
您现在可以将其中一个字符串设置为链接/按钮,而另一个则不可以。
希望它有帮助。