Try to execute the code as follows:
if ([itemOnSpecial isEqualToString: @"yes"] == NSOrderedSame) { UILabel *specialLabel = (UILabel*) [cell viewWithTag:5]; specialLabel.text = specialPrice; [specialLabel setHidden:NO]; if ([isOnBulkSpecial caseInsensitiveCompare:@"yes"] == NSOrderedSame) { UILabel *specialLabel = (UILabel*) [cell viewWithTag:5]; specialLabel.text = bulkSpecialPrice; [specialLabel setHidden:NO]; }else{ UILabel *specialLabel = (UILabel*) [cell viewWithTag:5]; [specialLabel setHidden:YES]; } }
Or like this:
if ([itemOnSpecial isEqualToString: @"yes"] == NSOrderedSame) { UILabel *specialLabel = (UILabel*) [cell viewWithTag:5]; specialLabel.text = specialPrice; [specialLabel setHidden:NO]; } else if ([isOnBulkSpecial caseInsensitiveCompare:@"yes"] == NSOrderedSame) { UILabel *specialLabel = (UILabel*) [cell viewWithTag:5]; specialLabel.text = bulkSpecialPrice; [specialLabel setHidden:NO]; }else{ UILabel *specialLabel = (UILabel*) [cell viewWithTag:5]; [specialLabel setHidden:YES]; }
I do not understand your script, but the first if statement has nothing to do with the second in your code.
source share