Linked Questions

Popular Questions

Alert message Swift 3

Asked by At

I can't figure out if I did something wrong or if it's the Swift 3 language. I am having trouble with the use of the displayAlertMessage local variable before its declaration.

Here is the code:

if(userPassword != userPasswordRepeat)
    {
        //Vis alarm besked
        displayAlertMessage(userMessage: "Passwords do not match.");
        return
    }
    if(userEmail == "" || userPassword == "" || userFirstName == "" || userLastName == "")
    {
        //vis alarm besked 2
        displayAlertMessage(userMessage: ("All fields are required to be filled."));
        return
    }

Related Questions