
Delegate pattern - iOS
Delegate Pattern 이란? Delegate라는 단어는 `위임하다` 라는 뜻을 지니고 있다. 즉 Delegate Pattern 이란 주로 객체의 행동(메소드) 또는 프로퍼티 의 구현을 다른 객체에게 맡겨야 할 필요가 있을 때 사용한다. 아래의 다이어그램을 살펴보자 Object using a delegate - delegate 가 필요하거나 사용하는 객체로, 어떤 이벤트가 발생했을 때 이에 대응되는 delegate 의 메소드를 호출한다. Delegate protocol - delegate object 가 구현해야 할 메소드들을 정의하는 protocol 이다. Object acting as a delegate - delegate protocol 을 준수하는 객체로, Object using a del..
Comment