Key-Value Coding Programming Guide - Key-Value Coding Fundamentals - Accessing Collection PropertiesKVC를 사용하는 객체에 일대다 프로퍼티는 다른 프로퍼티와 마찬가지로 set이나 get을 사용할 수 있습니다.key나 keypath와 관련된 set, get 메소드를 사용하면됩니다. 그리고 콜렉션 요소를 다루고 싶을 수 도 있습니다.그럴 때는 NSKeyValueCoding에 있는 proxy메소드를 사용하는 게 좋습니다이 프로토콜에는 콜렉션 객체에 접근하는 3가지 다른 proxy 메소드가 있습니다. 각각은 key, keypath로 나눠집니다. mutableArrayValueForKey: and mutableArrayValueFor..
Key-Value Coding Programming Guide - Key-Value Coding Fundamentals - Accessing Object Properties객체 인터페이스에 선언된 프로퍼티는 Attributes, To-one relationships, To-many relationships에 속한다.Attributes : 간단한 값들... 스칼라, strings, Boolean 값과 NSNumber은 객체, NSColor같은 불변타입 등...To-one relationships : 객체안에 객체 프로피터가 1:1관계To-many relationships : collections 객체들 Listing 2-1Properties of the BankAccount object@interface ..
Key-Value Coding Programming Guide - Getting Started - About Key-Value CodingKey-Value Coding Programming https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/KeyValueCoding/index.html#//apple_ref/doc/uid/10000107-SW1 Getting Started - about KVC(Key-Value Coding) 키-밸류 코딩이란 문자열(키)를 사용하여 객체의 인스턴스변수에 간접적으로 접근해서 값을 수정하거나 얻을 수 있는 방법. 이 방법을 사용하면 코드 가독성을 올리고, 코드 양도 줄일 수 있다. 또한 객체를..