File this one under “obvious once you think of it”: if you want to have a UIButton with some kind of animation effect, but that seems complicated since a UIButton can only have a single image specified; well then as described here, just create an animatable UIImageView,
NSArray *images = [NSArray arrayWithObjects:
imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image0.png"]];
imageView.animationImages = images;
then add it as a subview of a custom button!
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.bounds = self.imageView.bounds;
Which can then be made into a UIBarButtonItem if you like,
UIBarButtonItem *barButton = [[[UIBarButtonItem alloc] initWithCustomView: button] autorelease];
And then just call
[imageView startAnimating] to get your pretty pulsating or whatever action going.