How do I check if the text inputed in a UITextField is equal to a different value?
Alright, in my App when it is started the User picks a 4 digit password. This password is then saved into the Settings.bundle. Later I call NSString *textValue = to whatever is in the Settings.bundle. That works fine. In the app if a specific button is pressed another UItextfield is brought up asking for the user to enter then same password as set before. I just don't know how I would form an "if" statement that would check if the current textField equals the textValue.
I tried
if (passwordTextField.text = textValue) {
}
and also tried
if (passwordTextField.text == textvalue {
}
both did not work. I need a statement that is check if whatever the user submits in the passwordTextField equals the textValue string.
Alright, in my App when it is started the User picks a 4 digit password. This password is then saved into the Settings.bundle. Later I call NSString *textValue = to whatever is in the Settings.bundle. That works fine. In the app if a specific button is pressed another UItextfield is brought up asking for the user to enter then same password as set before. I just don't know how I would form an "if" statement that would check if the current textField equals the textValue.
I tried
if (passwordTextField.text = textValue) {
}
and also tried
if (passwordTextField.text == textvalue {
}
both did not work. I need a statement that is check if whatever the user submits in the passwordTextField equals the textValue string.
__________________
"The attraction of knowledge would be small if one did not have to overcome so much shame on the way" - iNietzsche iPhone App
I'm still new, but I think that helps as it's all fresh in my mind
You can click on the badge icon near my username to bump up my reputation if you like I'll try and help as many people as I can, and contribute the things I'm learning as I go along...
Quote:
Originally Posted by shabzcohelp
Ah! Thank you so much. Worked wonderfully.
You're a genius, I'm not sure why I didn't think of that.
__________________
"The attraction of knowledge would be small if one did not have to overcome so much shame on the way" - iNietzsche iPhone App