我看到在 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");
}