Daily iOS
Architecture

Delegate pattern

Can you explain the Delegate pattern that shows up all over UIKit?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Delegate is a 1:1 relationship where one object hands a decision or a piece of work at a specific moment to one other object through a protocol. A strong delegate property creates a retain cycle, so watch for that.

Share a question