Câu hỏi phỏng vấn Objective-C
Câu hỏi

What is difference between these three classes [NSManagedObject, NSManagedObjectContext,
NSManagedObjectModel] of CoreData?

Câu trả lời

Here are the key differences between the three Core Data classes you mentioned:

NSManagedObject

  • Represents a single entity instance in the Core Data store
  • Provides methods to access and modify the properties of the entity
  • Automatically handles the creation, updating, and deletion of objects in the context
  • Provides a way to track changes made to the object

NSManagedObjectContext

  • Represents a scratch pad for working with managed objects
  • Acts as the central hub for all interactions with the persistent store coordinator
  • Manages the lifecycle of managed objects, including creating, updating, and deleting them
  • Provides a way to save changes to the persistent store
  • A...
middle

middle

Gợi ý câu hỏi phỏng vấn

middle

What's the difference between the atomic and nonatomic attributes?

middle

What are some limitations and problems you can face with categories?

senior

How to create an abstract class in Objective-C?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào