Does the type in this KVC validation method matter?
Posted
by dontWatchMyProfile
on Stack Overflow
See other posts from Stack Overflow
or by dontWatchMyProfile
Published on 2010-06-13T08:22:19Z
Indexed on
2010/06/13
8:32 UTC
Read the original article
Hit count: 291
For example, in the docs a KVC-style validation method is implemented like this:
-(BOOL)validateAge:(id *)ioValue error:(NSError **)outError
They used id* as the type for ioValue. Since that's not part of the method signature, I wonder if it would hurt to do something like:
-(BOOL)validateAge:(NSNumber *)ioValue error:(NSError **)outError
Is this still fine with KVC?
© Stack Overflow or respective owner