FB13291926: NSTextLayoutManager.usageBoundsForTextContainer observer is never trigerred

October 20, 2023 ยท View on GitHub

I noticed that NSTextLayoutManager.usageBoundsForTextContainer is no longer KVO observable, despite being documented as KVO-compliant.. I believe it worked around macOS 13.

var usageBoundsForTextContainerObserver: NSKeyValueObservation?

usageBoundsForTextContainerObserver = textLayoutManager.observe(\.usageBoundsForTextContainer, options: [.new]) { textLayoutManager, change in
    print("never called")
}