Reputation: 21
UPDATE:
Figured it out, I was using weak variables instead of strong
I'm trying learn how to use parse with swift. I made a basic app that has a registration form that pushes the registration data to parse. However, I'm getting an error upon running the app.
This is the view controller where I'm having the error
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var user: UITextField!
@IBOutlet weak var pass: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func submit(sender: AnyObject) {
var account:PFUser = PFUser()
account.username = user.text
account.password = pass.text
account.signUpInBackgroundWithBlock{
(success:Bool!, error:NSError!)->Void in
if !(error != nil){
println("Sign Up Successful")
} else {
println("Failure")
}
}
}
}
Upvotes: 1
Views: 219