1

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")
            }
        }
    }
}
2
  • Check interface builder and unattach whatever submit is attached to Commented Nov 26, 2014 at 22:47
  • 1
    Since you have found the answer yourself, you should either 1) answer your own question and accept the answer or 2) remove the question altogether. Commented Nov 26, 2014 at 22:57

1 Answer 1

1

Change weak variables to strong variables

Sign up to request clarification or add additional context in comments.

1 Comment

In its current form, this answer is unlikely to be helpful to anyone else. Can you provide additional details?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.