我看到,在QTMovieLoadStateDidChangeNotification上设置通知没有任何效果,并且目标选择器永远不会被调用。我错过了什么吗?为什么QTMovieLoadStateDidChangeNotification不会触发?
在awakeFromNib:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieLoadStateDidChange:)
name:QTMovieLoadStateDidChangeNotification
object:nil];
在加载电影:
NSNumber *num = [NSNumber numberWithBool:YES];
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
url, QTMovieURLAttribute,
nil];
self.mQTMovie1 = [[QTMovie alloc] initWithAttributes:attributes
error:&error];
而且
- (void)movieLoadStateDidChange:(NSNotification *)notification {
NSLog(@"movieLoadStateDidChange got called");
}
是否简单地分配和初始化电影改变其负载状态?你可能不得不预先推出它,或者为了改变状态而播放它? – user1118321 2013-05-03 04:47:39
不是根据文档。 – martinjbaker 2013-05-03 10:01:25