This is my code:
NSString * atime = [NSString stringWithFormat:@\"%@\",[theDataObject.minuteArray objectAtIndex:indexPath.row]];
NSLog(@\"value of atime is:%@\"
if (atime==@"0")
Compares the memory address of atime
with the address of constant string @"0"
.
if ([atime isEqualToString:@"0"])
Compares the values that are stored in the two memory locations.
From your requirement it is seen that you want to compare the value not the memory location. So go for 2nd one.