解决方法
the docs给我指示keyPathsForValuesAffecting< Key>只有在设置观察时才会调用.
When an observer for the key is registered with an instance of the receiving class,key-value observing itself automatically observes all of the key paths for the same instance,and sends change notifications for the key to the observer when the value for any of those key paths changes.
在许多情况下,您可以使用KVO本身来通知您的观察者keyPathsForValuesAffecting< Key>已经改变.一些自定义键的手动willChangeValueForKey和didChangeValueForKey通知将是处理动态更改键的一种方法.