I have problem with the (&&) logic in swift, I don't understand why the compiler deal with 'and' logic as 'or' logic, I enter one field and he ignore the others
if (self.txtAddressNickname.text!.isEmpty == true) && (self.txtArea.text!.isEmpty ==
true) && (self.txtHouseNo.text.isEmpty == true) && (self.txtAddressType.text!.isEmpty
== true) && (self.txtStreet.text!.isEmpty == true) && (self.txtHouseNo.text!.isEmpty
== true) && (self.txtMobileNo.text!.isEmpty == true){
// alert
}
Aucun commentaire:
Enregistrer un commentaire