I am creating buttons programatically, and they are animated (fade & movement), I need the buttons to still have user interaction though. I have tried things like
options:(UIViewAnimationOptionAllowUserInteraction
which seems to do nothing :/ I have read several posts on here with different advice, including someone saying it isn't actually possible. Does anyone know if I can enable user interaction while a button is animating, and if it's not possible how do people get around this issue?
Thank you.
This is the current animation code that I was using:
[UIView animateWithDuration:106 
                      delay:0 
                    options:(UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionAllowAnimatedContent | UIViewAnimationOptionCurveEaseInOut)
                 animations:^{
                     [_planetButton setCenter:point];
                     _planetButton.alpha = 0.2;
                     _planetButton.userInteractionEnabled = YES;
                 }
                 completion:^(BOOL finished){
                     NSLog(@"animation completed");
                     //[_planetButton removeFromSuperview];
                 }
 ];
I also tried animation such as:
    CABasicAnimation *move = [CABasicAnimation animationWithKeyPath:@"transform2"]; 
    move.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    move.duration = 5.105;
    move.repeatCount = 1;
    move.autoreverses = YES;
    move.removedOnCompletion = YES;
    move.toValue = [NSValue valueWithCGPoint:point];
    [_planetButton.layer addAnimation:move forKey:nil];