愚蠢的問題警告......我可能會被剝奪睡眠,但我似乎無法弄清楚這一點。valueForKey返回零
'當前' 是一個NSDictionary
if ([current valueForKey:@"name"] != nil)
{
NSLog(@"here %@", [current valueForKey:@"name"]);
}
這將打印
here John
here Sam
here <null>
here <null>
here Billy
應該不是 '如果XX!=零' 阻止了空? 'name'存在於我的字典中,但名稱的值可能爲空。
你有解決方案嗎? –
'nil'和'null'或兩個完全不同的東西 – Popeye