我想像youtube一样双击屏幕左侧或右侧向avplayer添加快进和快退动画。下面是我的代码
[UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{
self.viewInner.alpha = 1.0;
[self.view layoutIfNeeded];
[self.view layoutSubviews];
} completion:^(BOOL finished) {
self.leading.constant = 50;
self.imgView.alpha = 1.0;
self.leading.constant = self.leading.constant + 50;
self.lblTime.hidden = false;
[UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{
[self.view layoutIfNeeded];
[self.view layoutSubviews];
} completion:^(BOOL finished) {
self.imgView.alpha = 0.0;
self.lblTime.hidden = true;
self.leading.constant = 50;
[UIView animateWithDuration:0.3 animations:^{
self.viewInner.alpha = 0.0;
} completion:^(BOOL finished) {
self.trailing.constant = -(self.viewInner.frame.size.width);
}];
}];
}];