美文网首页
宏定义 define

宏定义 define

作者: fordring2008 | 来源:发表于2017-02-05 13:42 被阅读15次

// 宏定义 define

// Swift 中宏定义被去除了,取代的是 let 或者 get 属性

// 例如

//var M_PI: Double { get }  // pi

// 宏定义改为方法的有

// NSLocalizedString(key, comment)

// 改成

//NSLocalizedString(<#T##key: String##String#>, tableName: <#T##String?#>, bundle: <#T##Bundle#>, value: <#T##String#>, comment: <#T##String#>)

// #define 消失了, #ifdef 也就消失了

// #if 没有

// 209

相关文章

网友评论

      本文标题:宏定义 define

      本文链接:https://www.haomeiwen.com/subject/euceittx.html