How do I flag a function as being deprecated in an iOS Objective-C header file?
I'm guessing there's just some keyword I can stick after the function somewhere?
I would like for a compiler warning to be generated should anyone try and use the deprecated function, similar to the behavior seen in Apple's APIs.
Try appending an attribute to your method declaration:
- (void)fooBar __attribute__ ((deprecated));
Taken from here.
2.1m questions
2.1m answers
60 comments
56.9k users