iPhone UIView框架动画不一致为什么?

时间:2010-04-09 12:21:32

标签: iphone animation uiview

我有一个使用从UIImagePickerController实例加载的图像的应用程序。一旦拾取器被解除,以减少从拾取器布局到下一个功能的布局的震动过渡,我最初使用图像的UIImageView填充整个屏幕,然后当拾取器被解除时,图像“挤压”到屏幕的左上角。

来自initWithFrame的

......

targetPicView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 480.0)];
[targetPicView setContentMode:UIViewContentModeScaleToFill];

这是在解雇选择器后调用的函数中...

[UIView beginAnimations:@"squeeze" context:context];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[targetPicView setFrame:CGRectMake(20.0, 20.0, 130.0, 150.0)];
[UIView commitAnimations];

奇怪的是,当从图书馆中选择图像时,这种方法很有效,视图缩小,左上角就像我计划的那样,但是...... 如果图像来自相机然后视图缩小,而右上角就位于,并且似乎从屏幕的左侧进入。

任何人都可以对此有所了解吗?

0 个答案:

没有答案