My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 4: screen rotation
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by perhbr...@gmail.com, Oct 5, 2010
Awesome piece of code. I was surprised to drop this into my project and have it work the 1st time wo any alterations. I have found 1 issue, unfortunately i can't tinker with it because I don't have a vga capable device.

What I see is that in landscape mode a screen  that is underneath the currently visible screen is rotating around so that you can see the corners of the screen as they rotate underneath the current form. 

I was wondering if there was a fix for this, thanks?
Oct 5, 2010
#1 perhbr...@gmail.com
Please see attached .mov file 
MVI_2397.MOV
6.9 MB   Download
Jan 18, 2011
#2 xscheta...@gmail.com
In file UIApplication+ScreenMirroring.m at line 168 add this: [mirrorLayer removeAllAnimations];

the method should look like this:

- (void)updateMirroredWindowTransformForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
	// Grab the secondary window layer
	CALayer *mirrorLayer = g_mirroredScreenWindow.layer;
	
	// Rotate the screenshot to match interface orientation
	switch (interfaceOrientation) {
		case UIInterfaceOrientationPortrait:
			mirrorLayer.transform = CATransform3DIdentity;
            break;
		case UIInterfaceOrientationLandscapeLeft:
			mirrorLayer.transform = CATransform3DMakeRotation(M_PI / 2, 0.0f, 0.0f, 1.0f);
            break;
		case UIInterfaceOrientationLandscapeRight:
			mirrorLayer.transform = CATransform3DMakeRotation(-(M_PI / 2), 0.0f, 0.0f, 1.0f);
            break;
		case UIInterfaceOrientationPortraitUpsideDown:
			mirrorLayer.transform = CATransform3DMakeRotation(M_PI, 0.0f, 0.0f, 1.0f);
            break;
		default:
			break;
	}
    
    [mirrorLayer removeAllAnimations];
}

Powered by Google Project Hosting