How to Make A button do more than one action xcode

Solutions Collect From Internet About “How to Make A button do more than one action xcode”

This is what methods are for. Create a method that takes an image name:

- (void)transitionToImage:(NSString *)imageName {
    UIImage * toImage = [UIImage imageNamed:@"CharacterBackwards.png"];
    [UIView transitionWithView:self.view
                      duration:0.01f
                       options:UIViewAnimationOptionTransitionNone
                    animations:^{
                        self->Guy.image = toImage;
                    } completion:NULL];
}

Now have your button handler call this twice:

- (IBAction)buttonHandler {
    [self transitionToImage:@"CharacterBackwards.png"];
    [self performSelector:@selector(transitionToImage:) withObject:@"CharacterForwards.png" afterDelay:0.4];
}