So I have a UILabel that is linked to the current selected value of a UIPickerView.
I also have a button that when pressed calls a method that reads the value from that UILabel, compares it with a specified NSString and according to that comparison and does or does not perform an action.
if (myLabel.text == @"sample text") {
// code that does something
}
However even though the label text and the text that I compare it to seem identical, it doesn’t pass the verification.
I hope that was clear enough.
String comparison