The proper way of doing chain animations

前端 未结 5 1784
余生分开走
余生分开走 2020-12-10 09:14
void (^first_animation)();
void (^second_animation)(BOOL finished);


// First animation

first_animation = ^()
{
    g_pin_info_screen.view.alpha = 1.0;
};


// Sec         


        
5条回答
  •  抹茶落季
    2020-12-10 10:02

    You need to chain them together by using + (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion

    Within the options: argument, you need to include UIViewAnimationOptionBeginFromCurrentState

    Good luck!

提交回复
热议问题