How do i add text to a label or tableview, instead of updating the label/tableview?
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 = ""
}
}
thePeople.text = thePeople.text+"NewText"
or shorter
thePeople.text += "NewText"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With