【发布时间】:2022-01-20 04:11:54
【问题描述】:
我是 swift 的初学者,我发现 this StackOverflow question 和 this StackOverflow question 对我的情况没有帮助,很可能是因为我对它的编码与他们不同(即 Swift,而不是 Obc)。
private let createAccountButton: UIButton = {
let button = UIButton()
button.setTitleColor(.white, for: .normal)
button.setTitle("dont have an account? sign up!", for: .normal) //line 4
return button
我想要文本“注册!”在第 4 行中以粗体进行格式化,但在我目前的编码方式下没有找到任何可以支持它的在线内容。
【问题讨论】: