iOS - 如何在方向更改时在图像中心进行旋转

时间:2013-05-16 07:23:50

标签: ios orientation screen-rotation

在Apple Photos App中,当它从纵向旋转到横向时。图像将在其中心点旋转。但是,照片应用程序创建自己只是不旋转中心点。

结构是这样的......  enter image description here

当它旋转到横向时......它将如下所示 enter image description here

然后我将在

中平铺页面(ImageScrollView)
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

有没有人知道如何让它在屏幕中心旋转?

1 个答案:

答案 0 :(得分:1)

Ushan87谢谢..

找到答案.. 设置图像框必须在

中完成
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;

并且视图将在其中心旋转