什么是最简单的*方法来实现一个符合键值观察的普通数据对象? [英] What's the most *simple* way to implement a plain data object which conforms key-value-observing?
本文介绍了什么是最简单的*方法来实现一个符合键值观察的普通数据对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
最简单是什么方法来实现一个符合键值观察的简单数据对象?
What's the most simple way to implement a plain data object which conforms key-value-observing?
推荐答案
创建一个包含纯属性属性的类, KVC兼容的集合访问器。基金会的魔法将照顾这样一个简单的对象的通知。
Make an class with properties for its plain value attributes and KVC-compliant collection accessors for collections. Foundation magic will take care of the notifications for a simple object like that.
这篇关于什么是最简单的*方法来实现一个符合键值观察的普通数据对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文