UITapGestureRecognizer not work when I animate the UIImageView

前端 未结 2 1479
你的背包
你的背包 2021-02-20 14:02

When I want to animate the UIImageView, the UITapGestureRecognizer added to it can not work. WHY???

-(void) testTap:(id)sender {
    NS         


        
2条回答
  •  伪装坚强ぢ
    2021-02-20 14:42

    You need to allow user interaction during animation.

    UIViewAnimationOptions options = UIViewAnimationCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction;
    

提交回复
热议问题