1
這是我當前的代碼,它只適用於用戶名和密碼,但是當我想添加更多字段時,比如firstname lastname phonenumber,它給了我一個錯誤,指出「PFUser沒有是firstname使用Xcode上的解析(Swift)註冊時出錯
一個memeber ......等等......」這是我的代碼片段:
func processSignUp() {
var userField = emlField.text
var usrPassword = pwdField.text
var firstField = frstField.text
var lastField = lstField.text
var phoneNumber = phoneField.text
// Ensure username is lowercase
userField = userField.lowercaseString
// Add email address validation
// Start activity indicator
// Create the user
var user = PFUser()
user.username = userField
user.password = usrPassword
user.firstName = frstField //ERROR HERE
user.lastName = lstField //ERROR HERE
user.phoneNumber = phoneField //ERROR HERE