Why aren't methods like – pickerView:titleForRow:forComponent:
part of UIPickerViewDataSource
instead of UIPickerViewDelegate
as it is currently? After all, the titles are data...
This seems very inconsistent to me. For example, UITableViewDataSource
contains both the methods – tableView:cellForRowAtIndexPath:
and – tableView:numberOfRowsInSection:
which seems logical.
Why then for UIPickerView
are the methods giving the number of rows and the methods giving the actual rows separated between UIPickerViewDataSource
and UIPickerViewDelegate
? Is there some logic to this I've missed?