UITableView -rectForRowAtIndexPath: throws exceptions

Originator:bigzaphod
Number:rdar://12974712 Date Originated:Jan 8, 2013
Status:Open Resolved:
Product:iPhone SDK Product Version:
Classification: Reproducible:
 
Contrary to documentation, UITableView's -rectForRowAtIndexPath: method will crash by way of throwing an exception if the passed in index path is invalid.

Documentation states the following:

Return Value
A rectangle defining the area in which the table view draws the row or CGRectZero if indexPath is invalid.

This is not what happens. I'm pretty sure that older iOS versions did as the documentation says, so this is probably a regression.

Attached is a project that will cause the exception to get thrown by sending an invalid index to the method.

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!