Creating an iOS/OS X cross-platform class
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I read a lot of questions about creating a cross-platform library for these 2 systems. Every answer points to static library as the solution. I don't want to end up with a static library, I'd like to create a class with methods for iOS and their counterpart for OS X. -( void ) createColor :( NSColor *); -( void ) createColor :( UIColor *); The first problem that I have is that I can't find a way to use classes that are available only in a specific system. So for example, how could I manage a function that works with UIColor in iOS