这是我的代码
NSMutableDictionary* stations = [[NSMutableDictionary alloc] init];
RadioStation* newStation;
newStation = [[RadioStation alloc]
initWithName:@"Star 94 fm" atfrequency:91.4];
[stations setObject:newStation forkey:@"WSTR"];
但我一直收到错误:"no visible @interface" for NSMutableDictionary declares the selector setObject forkey
任何帮助将不胜感激。
答案 0 :(得分:2)
正确的选择器是setObject:forKey:
,而不是setObject:forkey:
。