Question d’entretien chez Bank of America

What’s the difference between delegate pattern and closures?

Réponse à la question d'entretien

Utilisateur anonyme

2 janv. 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.