我在XCode中收到一个警告,上面写着NSValue may not respond to +valueWithCMTime:',但我不确定我做错了什么。在我的头文件中,我有以下内容:
#import <Foundation/Foundation.h>
#import <CoreMedia/CoreMedia.h>
...
-(void)displayTime:(CMTime)time;在我的实现文件中,我有:
-(void)displayTime:(CMTime)time
{
//This line has the warning
[mutableArray addObject:[NSValue valueWithCMTime:time]];
}我在另一个类中使用了上面的代码行,没有任何警告,那么这个类中会遗漏什么呢?这与方法的设置方式有关吗?
发布于 2011-10-19 03:56:36
您可能忘记了导入AVFoundation头文件。
#import <AVFoundation/AVFoundation.h>https://stackoverflow.com/questions/7812840
复制相似问题