calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

screenshot route should use drawViewHierarchyInRect:afterScreenUpdates: for iOS 7 #347

Closed jmoody closed 9 years ago

jmoody commented 10 years ago

motivation

Using drawViewHierarchyInRect:afterScreenUpdates will enable screenshotting of OpenGL views.

options

  1. Use drawViewHierarchyInRect:afterScreenUpdates and punt on the quality of the screenshots; the screenshots are good enough in my opinion.
  2. Detect UIAlertView or UIActionSheet in screenshot route and fall back to current behavior, otherwise use drawViewHierarchyInRect:afterScreenUpdates .
  3. Implement an OpenGL screenshot route that uses drawViewHierarchyInRect:afterScreenUpdates.
    • [x] @jmoody - option 1
    • [ ] @krukow krukow - option ??

@Clancey - feel free to weigh in on this.

testing

_NB._ screenshots were taken after animations were completed.

uialertview-screenshot

UIActionSheet

The drawViewHierarchyInRect:afterScreenUpdates is arguably better than the current 0.9.168 screenshot.

uiactionsheet-screenshot

jmoody commented 9 years ago

Moved to server.

jmoody commented 8 years ago

Issues with UIAlertView and UIActionSheet have been resolved.

screenshot_2 screenshot_3