As I know there is difference between objectForKey
and valueForKey
.
objectForKey:
datatype is :(id)aKey
whereas valueForKey:
datatype is :(NSString *)key
.
I know that this topic already discussed on stackoverflow
but that is not provide me satisfaction. so please do not mark as duplicated
I already referred :
Difference between objectForKey and valueForKey?
What is the difference between valueforKey:, objectForKey:, and valueForKeyPath:?
Finally NSString
is also type of id
. so why apple provide valueForKey
over objectForKey
. i think there is some performance problem or any other. my question is if objectForKey
satisfied all requirement of valueForKey
then what is need of valueForKey
?