方法一:
if ( [ [ dictionary allkeys ] containsObject:key ] ) {
// contains key
}
if ( [ dictionary objectForkey:key ] ) { // objectForKdy will return nil if a key doesn't exists.
// contains key
}
转载自:http : //blog.csdn.net/oik_ios/article/details/40479879