What is Key-Value-Coding and Key-Value-Observing in Objective-C?
What is Key-Value-Coding and Key-Value-Observing in Objective-C?
Key-Value Coding (KVC) and Key-Value Observing (KVO) are two powerful features in Objective-C that allow for dynamic access and observation of object properties.
Key-Value Coding (KVC):
person.address.city
without needing to write code to access each nested object directly[2].Key-Value Observing (KVO):
observeValueForKeyPath:ofObject:change:context:
method is called with details about the change[3][4].middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào