5
Estoy tratando de observar la propiedad "currentTime" de AVAudioPlayer. Pero el método ni siquiera se llama ... Lo necesito para establecer la posición de un UISlider ... Pero no está funcionando. Aquí está el código correspondiente:KVO AVAudioPlayer no funciona
[audioPlayer addObserver:self forKeyPath:@"currentTime" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:nil];
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context {
NSLog(@"%@", change);
}
Thanks.