加载QTMovie时发出警告

时间:2012-08-09 23:26:52

标签: objective-c cocoa video quicktime

我刚刚升级到Mountain Lion和Xcode 4.4,现在每当我在现有应用程序的QTMovieView上加载电影时,我都会收到这些警告。

2012-08-09 23:56:16.132 MyApp[3590:303] *** WARNING: -[NSImage compositeToPoint:fromRect:operation:fraction:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
2012-08-09 23:56:16.134 MyApp[3590:303] *** WARNING: -[NSImage compositeToPoint:operation:fraction:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
2012-08-09 23:56:16.137 MyApp[3590:303] *** WARNING: -[NSImage compositeToPoint:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
2012-08-09 23:56:16.137 MyApp[3590:303] *** WARNING: -[NSImage compositeToPoint:fromRect:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.

我正在使用此代码打开电影:

QTMovie *movie = [QTMovie movieWithURL:url error:nil];

if (movie)
{
    [[movieView movie] stop];
    [movieView setMovie:movie];
}

url检索NSOpenPanel的位置。电影打开并播放正常,但我想摆脱这些警告。

我不明白他们来自哪里,他们与NSImage班级有关,但我甚至没有在我的应用中使用NSImage个对象。

1 个答案:

答案 0 :(得分:0)

从你的-setMovie调用

,而不是你的错。

compositeToPoint:在SDK 3.26的NSImage.h

中声明
- (void)compositeToPoint:(NSPoint)point fromRect:(NSRect)rect operation:(NSCompositingOperation)op fraction:(CGFloat)delta;

我们应该报告错误