CoreData - can't set empty string as default value for attribute

后端 未结 8 857
鱼传尺愫
鱼传尺愫 2021-02-06 22:08

I have an entity in my datamodel with a string attribute that is currently optional, and I\'d like to convert this to a required attribute with a default value of the empty stri

8条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-06 22:39

    Maybe I'm late with this answer, but I was Googling and found this forum.

    The solution is very simple:

    1. When you click on the xcdatamodelId (On the left screen)
    2. Change the Entity View to Graph
    3. Double Click on any Attribute you want and the menu will appear on the right.

    All changes are easy.

    Part 2

    Part 3

提交回复
热议问题