iphone - test NSDictionary valueForKey using ISEqualToString -
i using if
statement see if valueforkey @"t" in nsdictionary
, don't think accessing nsdictionary
correctly because when know valueforkey t never enters if
statement.
this code looks like:
if ([[getobj valueforkey:@"hassetid"] isequaltostring:@"t"]) { [arrayofbuttonimages addobject:firstbuttonimage]; }
so if statment never entered if t.
if 1 knows how test valueforkey of nsdictionary
appreciated if me insight.
this supposed work, , it indeed. error somewhere else. try logging contents of dictionary:
nslog(@"%@", dict);
to see if key @"hassetid"
, , value indeed @"t"
. don't have whitespace character in 1 of them? etc.
Comments
Post a Comment