In this code opened in Xcode window:
observer = AVPlayer(url: url).observe(\.timeControlStatus, options: .new) { player, change in
...
}
option click on "observe" shows some minimalistic documentation (keyPath
- No description, options
- No description). ok - better than nothing. Command click opens some autogenerated swift code which doesn't have "observe" function in it (although there is the relevant "NSKeyValueObservedChange" in that file). Why is this the case and what do I do to view "correct" autogenerated file? It is an iOS target if it matters.
(Interestingly, I also failed to find the reference page for this call on Apple site (e.g. it is not listed here) other than in this overview).
I wonder if there's some magic in Swift to autogenerate this call from another, e.g. this: func observeValue(forKeyPath:of:change:context:)
?