📜  快速创建惰性属性 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:00:59.594000             🧑  作者: Mango

代码示例1
lazy var decimalFormatter: NumberFormatter = {
  let formatter = NumberFormatter()
  formatter.numberStyle = .decimal
  return formatter
}()