2012-05-24 54 views
-1

有誰知道如何像它在 Famous Brands做動畫的Objective-C圖像(需要安裝Flash Player觀看)動畫像幀/塊

+0

You mean動畫顯示在介紹? –

+0

是塊類型...與uiimageView –

+0

如果您的示例需要插件,_please_描述它的外觀以便更多人可以幫助您。 –

回答

0

把你的形象,並與喜愛的照片切它的零件應用程序。爲每個圖像創建一個imageView,並將其添加到扮演圖像容器角色的新的UIView。現在將此UIView添加到您的主視圖。

如果你想製作動畫只需通過所有imageViews迭代的容器視圖中,並啓動下面的動畫:

[UIView animateWithDuration:0.3 
         delay: i * 0.3 
         options:UIViewAnimationCurveEaseInOut 
        animations:^{ 
         currentImageView.alpha = 0.0; 
         currentImageView.transform = CGAffineTransformMakeScale(0.0, 1.0); 
        } 
        completion:nil 
]; 

凡currentImageView處於環路當前imageView,我迭代器變種。

將原始圖像與CoreGraphics分開會更好,因此您不必像上述那樣手動進行操作,但這有點多。

+0

Coregraphics如何做到這一點? –

+0

你的意思是削減一個較小的部分的大圖像? 在這種情況下,看看這個:[如何裁剪圖片](http://stackoverflow.com/questions/4743242/how-to-crop-image-in-to-pieces-programmatically) – yinkou