2011-04-01 53 views

回答

5

你正在寻找的是knwn为Ken Burns效果平移

这里是应用它的代码..什么

 [UIView beginAnimations:nil context:NULL]; 
     [UIView setAnimationDuration:7]; 

     [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; 
     CGAffineTransform rotate = CGAffineTransformMakeRotation(0.00); 
     CGAffineTransform moveLeft = CGAffineTransformMakeTranslation(0.9,0.9); 
     CGAffineTransform combo1 = CGAffineTransformConcat(rotate, moveLeft); 

     CGAffineTransform zoomOut = CGAffineTransformMakeScale(1.1,1.1); 
     CGAffineTransform transform = CGAffineTransformConcat(zoomOut, combo1); 
     background.transform = transform; 
     [UIView commitAnimations]; 

快乐编码:)

+0

嗨Shrey,你有任何示例代码? – avinash 2011-04-01 12:34:12

+0

上面的代码工程花花公子..我用它。 – Hisenberg 2011-04-01 12:38:16

+0

我有4个图像,它适用于第一张图片。但不会对其他图像产生相同的效果。 – avinash 2011-04-01 12:46:27