Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS8 scale glitch when calling drawViewHierarchyInRect afterScreenUpdates:YES

I was converting a project from iOS7 to iOS8 which uses custom transitions and needs to capture the modal after it finishes loading afterScreenUpdates:YES and was seeing that the entire screen scale up for a second and scale back down. I also see this happening in the Flickr app for iOS between sections and on Yelp app when transitioning to a photo on iOS8.

  UIGraphicsBeginImageContextWithOptions(self.view.frame.size, YES, 22.0); 
  [self.view drawViewHierarchyInRect:self.view.frame afterScreenUpdates:YES];
  UIGraphicsEndImageContext();

Adding a larger scale factor helps emphasize the glitch more... but i'm just calling this on a button press in the example.

EDIT This appears to happen on iPhone 6 and 6 plus not on the 5.

scale glitch

Sample project github

like image 350
glued Avatar asked Sep 27 '14 01:09

glued


2 Answers

Do you NEED it to draw after the screen updates? because I'm using:

[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:NO];

and it seems to work fine on iOS7 and iOS8. I imagine this isn't a great solution for capturing images regularly (like multiple times a second) but it seems to work for a once off blur.

like image 70
Jan-Dawid Roodt Avatar answered Sep 27 '22 21:09

Jan-Dawid Roodt


You have to provide @3x launch images for the 6 and 6 plus. The 6 being scaled at 750x1334, and the 6 plus image being scaled at 1242x2208.

like image 45
Zach Avatar answered Sep 27 '22 21:09

Zach