0
聲明我試圖運行下面的代碼:如果迅速
@IBOutlet var nameField: UITextField!
@IBOutlet var usernameField: UITextField!
@IBOutlet var passwordField: UITextField!
@IBOutlet var emailField: UITextField!
if nameField.text == "" || usernameField.text == "" || passwordField.text == "" || emailField.text == ""{
println("error")
}
但我上了XCode 6
Invalid character in source file
Expected '{' after 'if' condition
Braced block of statements is an unused closure
讓編譯器錯誤我怎樣才能解決這些問題?
截圖:
您發佈的代碼與屏幕截圖中的代碼不符。用適當的代碼更新你的問題。 – rmaddy
plz在條件結束處添加空間 – iAnurag