How can I get int values from the change dictionary in KVO method observeValueForKeyPath:ofObject:change:context:?
问题 I am observing changes in the rate property of an AVPlayer by calling the following method on it like so: addObserver:sharedPlayerManagerInstance forKeyPath:@"rate" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:0]; The change dictionary I get back from observeValueForKeyPath:ofObject:change:context: is therefore: change = { kind: 1, new: 1, old: 0 } I checked the class of each value, and it turns out to be __NSCFNumber. However, when I try to convert [change