0

I have a toolBarItem which calls a save action on a database. I would really much like to change the image of the item (a cabinet) dynamically so that a drawer opens, a label is animated "inside" and then it closes. Very much like the trash item on the mail app animation.

I know how to make a UIView pop-up by scaling it up and down on an animation on a given times given in an array (together with an array of CT scale), so I'm guessing it could be done more or less the same way.

Does anyone know about an example of who to accomplish that?. Back on xcode 4.1 i was able to highlight the button while the label was moving, but I cannot do that anymore (somehow I did add a normal button on the toolbarItem, which I cannot do anymore).

Thanks in advance!

Marcal
  • 1,371
  • 5
  • 19
  • 37

1 Answers1

0

well, if somebody is having the same issue here is how it can be done:

- (IBAction)barButtonAction:(UIBarButtonItem *)sender {

    NSArray *frameArray=[NSArray arrayWithObjects:[UIImage imageNamed:@"01-refresh.png"], [UIImage imageNamed:@"02-redo.png"], [UIImage imageNamed:@"03-loopback.png"], [UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"], nil];




    self.button.image=[UIImage animatedImageWithImages:frameArray duration:10.0];



}
Marcal
  • 1,371
  • 5
  • 19
  • 37