–tableView:viewForHeaderInSection: & friends should be in UITableViewDataSource

Originator:futuretap
Number:rdar://15422629 Date Originated:08-Nov-2013 11:01 AM
Status:Closed Resolved:
Product:iOS SDK Product Version:7.0
Classification:Enhancement Reproducible:Not Applicable
 
I find it illogical that methods to configure section header and footer views are in UITableViewDelegate and not UITableViewDataSource. Specifically I'm referring to

– tableView:viewForHeaderInSection:
– tableView:viewForFooterInSection:
– tableView:heightForHeaderInSection:
– tableView:estimatedHeightForHeaderInSection:
– tableView:heightForFooterInSection:
– tableView:estimatedHeightForFooterInSection:

Also, the height management methods for cells should belong to UITableViewDataSource imo:

– tableView:heightForRowAtIndexPath:
– tableView:estimatedHeightForRowAtIndexPath:


Reason: these methods encapsulate view management whereas the other methods in UITableViewDelegate manage interactions. The current separation is completely illogical to me.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!