maybe you could use a timer and a Long Press Gesture Recognizer
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(didRecognizeLongPressGesture:)];
longPress.minimumPressDuration = 0;
[self.button addGestureRecognizer:longPress];
...
- (void)didRecognizeLongPressGesture:(UILongPressGestureRecognizer*)gesture
{
static NSTimer *timer = nil;
if (gesture.state == UIGestureRecognizerStateBegan)
{
timer = [NSTimer scheduledTimerWithTimeInterval:1.1 target:self selector:@selector(changeImage:) userInfo:nil repeats:NO];
//change the image here
}
else if ( gesture.state == UIGestureRecognizerStateEnded)
{
if ([timer isValid])
{
//the user has pressed the button less than a second
[timer invalidate];
timer = nil;
}
}
}
- (void)changeImage:(NSTimer*)timer
{
[timer invalidate];
timer = nil;
//change to the other image here
}