My transform is not drawn after the frame is redrawn using setFrame.
I scale the view when the orientation changes using setFrame. But this opinion should also change position depending on the BOOL argument: On = up in view, off = down off screen. I use setTransform to adjust the position of the view.
First, I draw a view by executing setFrame . This leads to the fact that the picture of 100 points is outside the screen below. Then I set the transform (-100 to ty) to bring it to the viewpoints (while BOOL set to TRUE , otherwise the transform is 0 and the view is turned off).
[view setFrame:CGRectMake(0, self.view.bounds.size.height, self.view.bounds.size.width, 100)]; [view setTransform:CGAffineTransformMake(1, 0, 0, 1, 0, -100)]
This works fine, as expected, but when the orientation changes and this code is re-run (to resize the view), the transformation is not drawn, even if it is registered as a view transformation. In other words, the view is just off-screen, as if transform.ty was 0.
Log message before re-draw: view.transform.ty -10.000000 Log message after re-draw: view.transform.ty -10.000000
Any help?
source share