开发者

If I use Objective C 2.0's @synthesize, does that mean my model class is KVC compliant (including validation)?

1) Or do I still need to implement to validation methods described in the KVC guide? and 2) do I need to override the setNilValueForKey: and si开发者_运维技巧milar methods?

Thanks.


It is KVO compliant if you use @synthesize.

But it will not have any validation. The run-time can not make any guess on how you want to validate your data. So nil values etc. will be allowed. Validation is up to you.


What do you mean by "including validation"?

But indeed, your class is KVC compliant for the properties you declare as such

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜