Hur*_*rkS 1 boolean objective-c nsdictionary nsarray ios
我通过一个循环NSArray的NSDictionaries,我那么想使用的一个值在NSDictionary这类型的BOOL一个,如果statment ..但我有一些麻烦的事情了.
这就是我的for loop样子
for(NSDictionary *dict in arrayOfDictionaries)
{
NSNumber *boolCheck = [dict objectForKey:@"ISREADY"]; // isReady is the bool value which is either 0 or 1
if (boolCheck == [NSNumber numberWithBool:YES]) {
//...
}
}
Run Code Online (Sandbox Code Playgroud)
发生的事情是它循环遍历我的数组,但从未满足我的if语句的条件,即使我100%确定数组中有这种类型的值...并且很多就此而言.
任何帮助,将不胜感激.
| 归档时间: |
|
| 查看次数: |
2306 次 |
| 最近记录: |