iOS 7 custom transition glitch

前端 未结 4 1097
孤街浪徒
孤街浪徒 2021-02-08 18:24

This video shows the issue I am having. http://www.youtube.com/watch?v=C9od_2KZAbs

I am attempting to create a custom push interactive transition using a UIPanGestureRec

4条回答
  •  不要未来只要你来
    2021-02-08 19:21

    Or, as matt observed here, you can also either defer the completeTransition or drive the custom interaction controller yourself:

    I've seen something similar. I have two possible workarounds. One is to use delayed performance in the animation completion handler:

       } completion:^(BOOL finished) {
                double delayInSeconds = 0.1;
                dispatch_time_t popTime = 
                     dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
                dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
                    BOOL cancelled = [transitionContext transitionWasCancelled];
                    [transitionContext completeTransition:!cancelled];
                });
               self.interacting = NO;
        }];
    

    The other possibility is: don't use percent-drive animation! I've never had a problem like this when driving the interactive custom animation myself manually.

提交回复
热议问题