-1
Oops, I know it may seem simple, but I’m having trouble picking up the typed text on Uitextfield and pressing the include button on an array, but I’m not getting it. Someone can help me?
var listaDeNomes: [String]?
@IBOutlet weak var inserirNomesTF: UITextField!
@IBAction func IncludePlayer(_ sender: Any) {
if inserirNomesTF.text == ""{
print("pelo menos 5 caracteres")
}else {
listaDeNomes.append(inserirNomesTF.text)
}
}
If anyone can help me, I’d appreciate it