如何将文本添加到标签或表格 View ,而不是更新标签/表格 View ?
var personArray: [Person] = [
Person(name: "Heine", sex: "Guy"),
Person(name: "Magnus", sex: "Girl"),
Person(name: "Sarah", sex: "Girl")
]
@IBOutlet weak var thePeople: UILabel!
func updatePeople()
{
for peop in personArray{
thePeople.text = ""
}
}
Best Answer-推荐答案 strong>
thePeople.text = thePeople.text+"NewText"
或更短
thePeople.text += "NewText"
关于ios - 在 Swift 中将文本添加到 textview,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/26968219/
|