我收到来自JSON
一些响应,并且工作正常,但我需要检查一些null
值,IOS检查NSArray的== NULL
我已经找到了不同的答案,但似乎不工作仍在,
NSArray *productIdList = [packItemDictionary objectForKey:@"ProductIdList"];
我试图与
if (!productIdList.count) //which breaks the app,
if (productIdList == [NSNull null]) // warning: comparison of distinct pointer types (NSArray and NSNull)
那么发生了什么?如何解决这个问题,并检查我的阵列中的null
?
谢谢!
你是什么意思“刹车的应用程序”?如果它引发异常,请发布日志消息。 – 2012-03-01 06:05:50