Pregunta de entrevista de Bank of America

What’s the difference between delegate pattern and closures?

Respuesta de la entrevista

Anónimo

2 ene 2019

They’re almost identical in application but differ in implementation. Closures are great for making one off network requests. Delegate pattern is useful to conform a class to delegate off tasks to an external class. Read more: UITableViewDelegate.