I have the following code:
@implementation NSWindow (Coordination)
- (NSPoint)convertPointFromScreen:(NSPoint)point
{
NSRect rect = NSMakeRect(point.x, point.y, 1, 1);
return [self convertRectFromScreen:rect].origin;
}
I get a compiliation warning:
Category is implementing a method which will also be implemented by its primary class
I know Swift has builtin preprocessor directives to detect SDK version, but don't know how to do this in objc. Any suggestions?
I am disappointed that there is no actual answer to the question in the title. I need an answer to this and this is the first hit on Google. Yet, all that I see here is suggestions for solving the specific issue but not the question in the title.
To answer Quinn's question: In my case, I need to keep my code compatible with various SDK versions (for various reasons that are valid but shouldn't need to be justified here), so I need to add conditional code depending on the SDK version. And since it's a compile time issue, I cannot use @available() here, either.
So I really need to know which SDK I'm compiling under.