Does anyone know how to animation an image in Objective-C like it is done at Famous Brands (Requires Flash Player to see)
Asked
Active
Viewed 65 times
-1
-
You Mean animation shown on intro? – Sagar... May 24 '12 at 06:35
-
Yes Blocks type...with uiimageView – Divya Jain May 24 '12 at 06:36
-
If your example requires plug-ins, _please_ describe how it looks so that more people can help you. – David Rönnqvist May 24 '12 at 08:01
1 Answers
0
Take your image and slice it in parts with your favorite photo app. Create an imageView
for each image and add it to a new UIView
which play the role of the image container. Now add this UIView
to your main view.
If you want to animate it simply iterate through all imageViews
inside your container view and start the following animation:
[UIView animateWithDuration:0.3
delay: i * 0.3
options:UIViewAnimationCurveEaseInOut
animations:^{
currentImageView.alpha = 0.0;
currentImageView.transform = CGAffineTransformMakeScale(0.0, 1.0);
}
completion:nil
];
Where currentImageView is the current imageView
in the loop and i the iterator var.
It would be even better to slice the original Image with CoreGraphics
, so you don't have to do it manually as stated above but that's a little bit more work.

yinkou
- 5,756
- 2
- 24
- 40
-
-
You mean to cut one large image in smaller parts? In that case take a look at this: [how to crop an image into pieces](http://stackoverflow.com/questions/4743242/how-to-crop-image-in-to-pieces-programmatically) – yinkou May 24 '12 at 11:14