title: Scroll until element is visible iOS UI Automation with Xcode 7
body: <p>So with the new Xcode update Apple has revamped the way we do UI testing. In instruments we used java script function &quot;isVisible&quot; to determine if our targeted element is visible.</p>
  <p>I'm trying to replicate this in Objective-C but I can't seem to find the equivalent of this. I have a table view, a prototype cell with two labels on it. This prototype cell is reused 50 times lets say.</p>
  <p>I'm trying to scroll until the last cell is visible, I did this by doing this:</p>
  <pre><code>if (![[[[[[XCUIApplication alloc] init].tables childrenMatchingType:XCUIElementTypeCell] matchingIdentifier:@&quot;cell&quot;] elementBoundByIndex:49].staticTexts[@&quot;text&quot;] exists]) {
          [[[[[[XCUIApplication alloc] init].tables childrenMatchingType:XCUIElementTypeCell] matchingIdentifier:@&quot;cell&quot;] elementBoundByIndex:0].staticTexts[@&quot;text&quot;] swipeUp];
  }
  </code></pre>
  <p>But this won't swipe since the element exists when the view is loaded. Please help because this is driving me crazy.</p>