Dears,
How can I compare if the content of two uiTextFields are different to empty?
I was tryting to do something like this but I got the following error: Comparing non-optional value of type 'String' to nil always returns true
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
self.view.endEditing(true)
let apresentacao: String = tfApresentacao.text!
let corte: String = tfCorte.text!
if apresentacao != nil && corte != nil {
calcJornadaTrabalhada()
lbEvento.isHidden = false
lbTempo.isHidden = false
}
}Thanks