UIView动画

移动动画

//在block块中进行移动,偏移
[UIView animateWithDuration:0.3 animations:^{
 }];

转场动画

//这是添加View时,不显得突兀。比如jian'ru
self.popView.alpha = 0;
[self.view addSubview:self.popView];
//这是转场动画
[UIView transitionWithView:self.popView duration:0.1 options:UIViewAnimationOptionCurveEaseInOut animations:^{
    self.popView.alpha = 1;
} completion:^(BOOL finished) {}];

你可能感兴趣的:(UIView动画)