swift - KVO - change.newValue and change.oldValue are nil

后端 未结 1 1537
执笔经年
执笔经年 2021-01-11 14:14

I\'m using the new KeyValue Observing. I\'m getting a call to my observer when the variable changes, but the change struct comes with newValue and

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-11 14:40

    This is a Swift bug which has been reported as https://bugs.swift.org/browse/SR-5872. A pull request which addresses this issue is being discussed on https://github.com/apple/swift/pull/20757 but is not yet merged as of October 2020.

    0 讨论(0)
提交回复
热议问题