Capturing with drawViewHierarchyInRect:afterScreenUpdates: on iPad causes screen to flicker

Originator:mundue
Number:rdar://17292507 Date Originated:6/12/14
Status:Fixed Resolved:6/24/14
Product:iOS SDK Product Version:iOS 7.x
Classification:Bug Reproducible:Always
 
Summary:
If you use Capturing with drawViewHierarchyInRect:afterScreenUpdates: for an iPhone app running on iPad, the screen will flicker and contents of screen views become offset.

Steps to Reproduce:
1. Open attached Xcode project iPad-Screenshot
2. Set breakpoint at ViewController.m line 32.
3. Run project on iPad simulator
4. Press the "Take Screenshot" button
5. When app stops in debugger, step over line 32


Expected Results:
Screen views should not change.

See image "before_line32.jpg"


Actual Results:
Screen views are offset and/or distorted.

See image "after_line32.jpg"

Version:
iOS 7.x and iOS 8.0 beta

Notes:
Changing the afterScreenUpdates: parameter to NO eliminates the problem.

Configuration:
iOS simulator in Xcode 5.x and Xcode 6 beta

Fixed in iOS 8, seed 2 (Build 12A4297e)

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!