You cannot use GIF files or any animation code for your launcher (splash screen), you can only use a static image, PNG or JPG (if the booster is a storyboard).
So, if you want your application to run with some animation, you have to control it in your first view controller.
You can animate imageviewwith sets of images, for example,
UIImageView* myImageViewForAnimation = [[UIImageView alloc] initWithFrame:self.view.bounds];
myImageViewForAnimation.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"image1"],
[UIImage imageNamed:@"image2"],
[UIImage imageNamed:@"image3"],
[UIImage imageNamed:@"image4"], nil];
myImageViewForAnimation.animationDuration = 1.0f;
myImageViewForAnimation.animationRepeatCount = 0;
[myImageViewForAnimation startAnimating];
[self.view addSubview: myImageViewForAnimation];
Update (as indicated in the comment):
You can get your idea by which you added gesture recognizeractions to your method, or you can set tagfor each imageviewand process it in the action method.
For instance,
-(void)tapOnProfileImage : (UITapGestureRecognizer*)recog{
UIImageView *tempView = (UIImageView *)recog.view;
if (recog.view.tag == 1) {
}
if (recog.view.tag == 2) {
}
}
So, on each representation of the image, you must add target with selector - tapOnProfileImage, and you can distinguish it, as indicated in the code snippet above!
source
share