gpt4 book ai didi

swift - 使用闭包设置属性报错

转载 作者:行者123 更新时间:2023-11-28 12:06:12 25 4
gpt4 key购买 nike

<分区>

我正在使用以下代码来设置带有闭包的 UITextView 的属性。但是它给了我以下错误。

Type of expression is ambiguous without more context

let textView = UITextView {
$0.text = "SAMPLE TEXT"
$0.isEditable = false
$0.contentInset = UIEdgeInsets(top: 14, left: 0, bottom: 0, right: 0)
}

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