Am having problems with what looks like a very simple IF statement, here is the code:
NSString * lowerCaseSubject = [_subjectParameter lowercaseString];
NSString * subjectPriceString = nil;
if (_subjectParameter) {
for (int p=0; p < arr.count; p++) {
subjectPriceString = [arr[p] valueForKeyPath: @"name"];
if (subjectPriceString == lowerCaseSubject) {
float price = [[arr[p] valueForKeyPath: @"pricePerHour"]floatValue];
priceLabel.text = [NSString stringWithFormat:@"%.0f", price];
}
}
}else{
I'm debugging and find that the IF statement below is never set true and so the statements following it never executed:
if (subjectPriceString == lowerCaseSubject) {
This, despite the following field value showing:
Have been trying to fix for ages and getting no where, can anyone see what I am missing here? Thanks