Could someone explain what exactly is the difference between the two?
However, as a programmer you really could care less about such technical distinctions. Rather, when you want to respond to certain events that are specified in a DataSource protocol, then you make your class inherit from that protocol and you implement the relevant method. And if the event you want to respond to is defined in a Delegate protocol, you do the same thing. As far as I know, it’s irrelevant which type of protocol contains the method. In fact a UITableViewController, which you will see later in the book, is simultaneously both the delegate and the data source for a table view: the UITableViewController automatically inherits from both a delegate and a data source protocol.