Mark as deprecated/unavailable
Apple includes availability macros to allow you to transition your code safely while working in a team environment. Also shows compiler messages when using deprecated/unavailable messages
Simply import the following in to your header file:
#import <AvailabilityMacros.h>
Then mark functions by attaching the appropriate keyword to the end of the message definition in your header file:
- (void)noLongerAvailable UNAVAILABLE_ATTRIBUTE;
- (void)availableButFindAnotherWay DEPRECATED_ATTRIBUTE;
This is much more pleasant then the equivalent:
__attribute__((deprecated))
Written by Gary
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Objective-c
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#