Possible Duplicate:
How to compare strings? (==returns wrong value)
I have the following code but nothing happens, why is this?:
if(Assignment1DueDate.text == @"0 days until due"){
[Assignment1DueDate setText:@"Due tomorrow"];
[maincelltext addObject:Assignment1.text];
[subtitlecelltext removeObject:Assignment1DueDate.text];
[subtitlecelltext addObject:Assignment1DueDate.text];
}
P.S. Assignment1DueDate is the UILabel.
1 Answer