我正在使用旧的 12" Powerbook 作为移动机器人平台的大脑,我无法让 NSTimer 在 XCode 3.2.3 中编译。在 C 中创建标准工具,使用:
[NSTimer scheduledTimerWithTimeInterval:2.0
target:self
selector:@selector(targetMethod:)
userInfo:nil
repeats:NO];
当我构建时,我收到“[令牌之前的语法错误”。或“{ token 之前的语法错误。” 取决于 NSTimer 调用出现的位置。
任何指针?