tags:

views:

80

answers:

1

hi, i have one imageview in IB.i linked it perfectly in my view controller's IBoutlet which is as IB_img .i have done in my viewdidload as

     self.IB_img.animationImages = [NSArray arrayWithObjects:    
 [UIImage imageNamed:@"img_1.jpg"],
 [UIImage imageNamed:@"img_2.jpg"],nil];


 self.IB_img.animationDuration = 1;

 self.IB_img.animationRepeatCount = 0;
 [self.IB_img startAnimating];

it is not working perfectly....image is not in screen..but if i do it in without IB,in other words dynamically...it works perfectly...any help please to do animation with IB ?

A: 

You would have not set the Mose of the imageView as in required format.

You can do it as:

Try to set the one of the animation images as the image of your image view in xib(temporarily).

then set the image view's mode as strecthtofit or whatever suits you. now remove the image. and build you will see the image in proper position.

Madhup
i did...what you have mentioned..but the one of the animation imagesis shown correctly...but animation was not happened...it is with only one image...
Mikhail Naimy
check if the animation occurs when you replace that image. If it happens then it is the problem of image
Madhup