我正在尝试从存储在字典中的数组中删除一个对象。我已经能够使用以下代码按索引删除对象:
[compHandHighValuesArray removeObject:[NSNumber numberWithInt:[[highCardDictionary valueForKey:[cardsShuffled objectAtIndex:1]] intValue]]];
但是现在我想将 [cardsShuffled objectAtIndex:1] 更改为 ID 变量。当我将代码替换为:
[compHandHighValuesArray removeObject:[NSNumber numberWithInt:[[highCardDictionary valueForKey:[compCardOneTitle]] intValue]]];
我收到“预期标识符”的错误。我错过了什么?