【发布时间】:2017-04-07 00:45:09
【问题描述】:
我正在创建一个具有执行类似任务的函数的类,但其中一个使用的是仅在该平台上可用的 API。是否可以在为特定平台构建时使该功能无法访问?
例子:
class myClass {
// How can I hide this function when I'm building for macOS?
class func myFunctionForIOS() {
}
// And hide this when building for iOS?
class func myFunctionForMACOS() {
}
}
【问题讨论】: