2

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?

shim
  • 9,289
  • 12
  • 69
  • 108
houbysoft
  • 32,532
  • 24
  • 103
  • 156

0 Answers0