square/KIF — pull request #130 by blakewatters (2012-07-02 20:42:49+00:00)
Title: Use scrollRectToVisible: instead of setContentOffset: on UIScrollView

The current implementation of `+ (UIAccessibilityElement *)_accessibilityElementWithLabel:(NSString *)label accessibilityValue:(NSString *)value tappable:(BOOL)mustBeTappable traits:(UIAccessibilityTraits)traits error:(out NSError **)error;` uses setContentOffset: to scroll resolved accessibility elements into the visible frame of the scroll view by the y origin point as the offset. This causes table views to be very jerky when cells are found directly by accessibility label and scrolls all other cells above the found cell out of the visible frame.

On iOS 5, this is an annoyance. On iOS 6, the offscreen cells fail to be found and return nil, breaking scenarios.