I have a change in my API and I want to mark one method as deprecated. I've put the following on it's signature: attribute((deprecated("Don't use this method"))); However, I don't know how do I need to behave in the method body itself.
Can't find anything on Apple coding starts to lead me. The method return BOOL. should I just return false?
Deprecated means the method still work, but can be removed in the future versions and the new method is most preferred.
You can give some additional info to the user who uses the deprecated method:
/**
* @deprecated This method is deprecated starting in version x.x
* @note Please use @code newMethod:withNewParameter: @endcode instead.
*/
-(void)depFunction:(id)x __attribute__((deprecated));
When he use like:
[yourClassObj depFunction:@"argument"];
The Quick Help Panel will show an information like:
You might also want to change attribute((deprecated("Don't use this method")));
to DEPRECATED_MSG_ATTRIBUTE("Don't use this method, use the other one instead.");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With