-1

这是我的代码

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

任何帮助将不胜感激。

4

1 回答 1

2

The correct selector is setObject:forKey:, not setObject:forkey:.

于 2013-09-25T19:12:43.217 回答