How to use binary flags in Core Data?

前端 未结 4 1826
隐瞒了意图╮
隐瞒了意图╮ 2020-12-24 14:35

I have an int32 attribute in a Core Data database. I use this int as an enum bit field.

Is it possible to create a NSPre

4条回答
  •  时光说笑
    2020-12-24 15:01

    I hardly doubt it.

    But you may use an enum for the values stored in the attribute, and use a direct comparison instead of a bit masking.

提交回复
热议问题