我看到,在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