...setValue:forKey: determines the data type required by the appropriate accessor or instance variable for the specified key. If the data type is not an object, then the value is extracted from the passed object using the appropriate -Value method.
For example, if the type of the property being set is
@property int index;
KVC will call the
intValue method on the given value object to convert it to the appropriate type before setting the property value:
[self setValue:@"10" forKey:@"index"]; // calls intValue on "10"
Thanks very much to Stack Overflow user CRD for providing the answer!