I have an idea that I am converting to
originalTransform = self.appContainer.transform; self.appContainer.transform = CGAffineTransformMakeScale(.8, .8);
If I do not rotate the device, I can return it back to the original with
self.appContainer.transform = CGAffineTransformScale(originalTransform, 1, 1);
Unfortunately, if I rotate the device, the transformation matrix for the view changes by rotating the view and breaks the original scale. If I cancel the scale after rotation, I will stay with UIView
without returning to the original full-size.
I am sure that I need to make calculations between the original transformation matrix and the new one, but I'm not sure how to do it. The only thing I could do to make this work was to return the scale to 1 before rotating
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { self.appContainer.transform = CGAffineTransformScale(originalTransform, 1, 1); }
And then drag it with the modified transform after
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { self.appContainer.transform = CGAffineTransformMakeScale(.8, .8); }
This makes it work as I expect, but instead of returning to full-screen mode and then returning to the .8 scale, I would like it to move from a new conversion to the correct .8 scale.