How to represent Core Data optional Scalars (Bool/Int/Double/Float) in Swift?

前端 未结 4 1616
你的背包
你的背包 2020-12-09 07:13

(first noticed on: Xcode 8.2.1, iOS 10, Swift 3) (still present as of: Xcode 9 beta 3, iOS11, Swift 4)

We all know that the Core Data concept of o

4条回答
  •  星月不相逢
    2020-12-09 08:08

    This happens because Objective-C scalar types do not have a notion of nil value. Source: handling-core-data-optional-scalar-attributes

提交回复
热议问题