Question

In Apple Photos App, when it is rotated from portrait to landscape. The image will rotate on its center point. However, the photo app created myself just not rotate on the center point.

The structure is like this.. enter image description here

When it rotates to landscape.. it will look like following enter image description here

And Then I'll tile the pages(ImageScrollView) in

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

is there anyone know how to make it rotate on the center of screen?

Was it helpful?

Solution

Ushan87 Thanks..

Found the answer.. set the image frame must be done in

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;

and the view will rotate on it's center

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top