gpt4 book ai didi

objective-c - 加载 QTMovie 时发出警告

转载 作者:行者123 更新时间:2023-12-03 17:24:09 26 4
gpt4 key购买 nike

我刚刚升级到 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];
}

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

我不明白它们来自哪里,它们似乎与 NSImage 类相关,但我什至没有在我的应用程序中使用 NSImage 对象。

最佳答案

来自你的 -setMovie 调用,不是你的错。

compositeToPoint:在 SDK 3.26 的 NSImage.h 中声明

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

我们应该报告错误

关于objective-c - 加载 QTMovie 时发出警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11893436/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com