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

junior

What are Objective-C Categories?

senior

Explain the difference between interfaces, delegates, and protocols in Objective-C

junior

What is the difference between copy and retain ?

Bình luận

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

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