首页 > 代码库 > Block 对过度动画的封装

Block 对过度动画的封装



     参数1. 要改变的view 参数2. 动画的时长 参数3 动画类型 参数4.
    [UIView transitionWithView:self.changeView

                                  duration:2

                                   options:UIViewAnimationOptionTransitionFlipFromBottom

                             animations:^{
        //要改变的属性
        self.changeView.backgroundColor = [UIColor purpleColor];
        
    }                   

                            completion:^(BOOL finished)

{
        
    }];

Block 对过度动画的封装