A UITableView object has two properties: one delegate, and one dataSource. Are they exactly the same design pattern? I don’t see books or reference calling dataSource a second delegate for the UITableView.
A UITableView object has two properties: one delegate , and one dataSource . Are
Share
No, they are not the same thing but they are using the delegate pattern.
They are both different and distinct delegates that serve different purposes. One property is for the UITableViewDataSource and the other is for UITableViewDelegate.
Here is how they are defined in UITableView.h:
The delegate pattern is pretty simple and the Wikipedia entry sums it up pretty well: