how to to make gesturerecognizer working in an animating UIImage view

后端 未结 3 1025
鱼传尺愫
鱼传尺愫 2021-01-19 21:18

i have 5 animating image in a image view and will like to allow user to tap on them base on the default ID and push it to another view. i tried to add in gesture tap but the

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-19 22:12

    Really late but I've been facing the same issue and I found what I think is a better solution:

    Just use the UIViewAnimationOptionAllowUserInteraction option like that:

    [UIView animateWithDuration:4.0
                          delay:0
                        options:UIViewAnimationOptionAllowUserInteraction
                     animations:^{ 
                         imageViewTop.alpha = 0.0;
                         imageViewBottom.alpha = 1.0;
                     } 
                     completion:^(BOOL  completed){
                         [self nextAnimation:stringsize.width];
                     }
    ];
    

提交回复
热议问题