1
output.videoSettings = [NSDictionary dictionaryWithObject:
    [NSNumber numberWithInt:kCVPixelFormatType_32BGRA]
    forKey:(id)kCVPixelBufferPixelFormatTypeKey];

我在此特定行上收到此错误

No known class method for selector "dictionaryWithObject:forKey:

这个错误有什么原因吗?

4

1 回答 1

3

试试这个:

videoOutput.videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA], (id)kCVPixelBufferPixelFormatTypeKey,
                             nil];
于 2012-06-11T13:55:24.840 回答