Normally, rectForRowAtIndexPath can treat invalid indexPaths as document states, but in iOS 7.1, it incorrectly processes an invalid index. Thus, passing to nil will fail and receive an error message:
error request if the pointer path is incorrect ({length = 2, path = 0 - 0})
In short, manually performing a nil check is necessary for rectForRowAtIndexPath.
source
share