Objective-c: why private ivars are not hidden from the outside access when using KVC
问题 After trying to access ivars using KVC, I have noticed that there was no protection on private and protected ivars. It doesn't matter what I put a in front of the ivar (private or protected keyword) - an ivar is always a public ivar when using KVC method "setValue". Here is my code where all of the seven ivars and properties are changeble outside the class instance: //************ interface file ***************// @interface MyClass : NSObject { @public NSNumber *public_num; @protected