views:

167

answers:

1

I am returning a string of either T or F from an NSDictionary key value pair. I'm trying to find out if it is the T or the F, but it never works like I would expect it to. I'm sure there is a very basic solution for this issue.

if ([game objectForKey:@"complete"] == @"T") never evaluates to true.
+10  A: 

Change that to:

if ([[game objectForKey:@"complete"] isEqualToString: @"T"])

What you were doing was comparing pointers to strings, not their contents.

NSResponder