I'm trying to make a NSObject
subclass that will have a lot of methods that return colors, so I wanna return UIColor
if I'm building for iOS or NSColor
if I'm building for OS X.
This is kind of a pseudo-code of what the expected behaviour should be:
#define COLOR #if TARGET_OS_IPHONE UIColor #elif TARGET_OS_MAC NSColor #endif
+ (COLOR *)makeMeColorful;
Is it possible to do something like this instead of making 2 methods for each of my object's method (one for iOS and another for OS X)?