Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
收到有关 API 'set value for key on a NSObject' 折旧的错误
我正在将我的代码升级到 Swift 4.2 。在运行时升级时,代码此时崩溃。
object.setValue(valueToSet, forKey: key)
在这里你必须添加@objcMembers到NSObject类中。
@objcMembers
NSObject