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
精彩评论