I am having some very frustrating trouble on what I'm sure is a very simple problem, but I cannot seem to fix it. I have an NSArray called final that outputs as follows:
final = (
".DS_Store",
"hey.txt"
)
I want the following for loop to return false for the first pass and true for the second. As far as I can tell I have it made correctly but the output is true for both passes.
for (int i = 0; i < [final count]; i++) {
if (final[i] != @".DS_Store") {
NSLog(@"true");
}
else {
NSLog(@"false");
}
Outputs:
2013-02-20 17:20:39.042 myAppName [40636:403] true
2013-02-20 17:20:39.042 myAppName [40636:403] true
I cannot figure out why the first one does not return false. Any Ideas?