Where can I find a good example of a Core Data to-many relationship?

后端 未结 8 1664
广开言路
广开言路 2020-12-13 03:19

Does anyone have a tutorial or source code that shows a to-many relationship being used, where the user add elements in on the fly? I would just like to have a look because

8条回答
  •  别那么骄傲
    2020-12-13 03:29

    See Apple's Core Data Programming Guide.

    I create objects and add them to relationships using mutableSetValueForKey:

    mutableSetValueForKey: returns a mutable proxy object. If you mutate its contents, it will emit the appropriate key-value observing (KVO) change notifications for the relationship.

提交回复
热议问题