Snapshot methods broken on iPhone 6 device and simulator

前端 未结 3 1695
谎友^
谎友^ 2021-02-18 23:50

For some unknown reason there seems to be a possible bug with all screenshot methods on the iPhone 6 simulator (and device). Whenever I call any of the screenshot methods includ

相关标签:
3条回答
  • 2021-02-19 00:12

    Following on from Ryans solution, I added a launch screen xib (or storyboard) and this resolved the issue on the iPhone 6 and 6 plus.

    So make sure you have it set in your project settings, it should end up looking something like this:

    enter image description here

    0 讨论(0)
  • 2021-02-19 00:15

    We are seeing this same issue when running the following code:

    [window drawViewHierarchyInRect:window.bounds afterScreenUpdates:YES];
    

    The only solution that we have found so far is to make sure that the application has launch images sized for the iPhone 6 and 6+ and then we no longer are getting the flickering.

    0 讨论(0)
  • 2021-02-19 00:18

    It seems to be a bug on Apple's side that occurs on scaled apps (those that have no design/assets/layout support for iPhone 6/6+) This one helped me get over it: snapshotViewAfterScreenUpdates glitch on iOS 8

    Basically uses: [view.layer renderInContext:UIGraphicsGetCurrentContext()];

    0 讨论(0)
提交回复
热议问题