2015-09-03 56 views
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 

回答

1

這些都是自定義字段和u與

user["firstname"] 
user["lastname"] 

等達到他們...