标签: swift or-operator
如何在Swift 3中使用OR ||运算符使用If语句
||
if (oName.text="" || oWeight.text="") { print("Field Empty") }
答案 0 :(得分:9)
您正在分配而不是检查是否相等...
if (oName.text == "" || oWeight.text == "") { print("Field Empty") }