Access Method After UIImageView Animation Finish

后端 未结 7 936
清酒与你
清酒与你 2020-12-01 11:47

I have an array of images loaded into a UIImageView that I am animating through one cycle. After the images have been displayed, I would like a @selector to be

7条回答
  •  情歌与酒
    2020-12-01 11:52

    in ImageView.m

    - (void) startAnimatingWithCompleted:(void (^)(void))completedHandler {
    if (!self.isAnimating) {
        [self startAnimating];
        dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, self.animationDuration * NSEC_PER_SEC);
        dispatch_after(popTime, dispatch_get_main_queue(),completedHandler);       
    }}
    

提交回复
热议问题