嗨,我想知道如何将 setObjects 的内容与 NSDictionary 中的键进行比较:这是我正在使用的代码:
[INNumbers setObject:@"0,1,2,3,4,5,6,7" forKey:@"0"];
[INNumbers setObject:@"4,5,6,7,8,9,10,11" forKey:@"1"];
我想知道如何比较这两个键并找出是否有类似的数字,例如两者中是否出现 7?
//this will get the numbers in the keys for me
id number1 = [INNumbers objectForKey:@"0"];
id number2 = [INNumbers objectForKey:@"1"];
但我不确定如何比较 number1 和 number2 检索到的内容。