Reputation: 6406
I'm trying to have a method behave differently between iOS and MacOS. I need this to process keyboard events on the MacOS platform.
Browsing the source code, I found the following macros in use. When running my code for the macos platform, I only get "begin" being output to console, as if the "_CC_PLATFORM_MAC" wasn't defined.
Am I doing this wrong?
-(void)processEvent:(NSEvent*)event{
NSLog(@"begin");
#ifdef __CC_PLATFORM_IOS
NSLog(@"nothing here");
#elif defined(__CC_PLATFORM_MAC)
NSLog(@"process keyboard event");
#endif // __CC_PLATFORM_MAC
}
Thanks...
Upvotes: 0
Views: 104