我有 2 个视图,A 和 B。
A(Aframe)--------------->B(Bframe)------>C(cFrame)
我想执行一个动画。A 将从 Aframe 移动到 Cframe。但在 B,A 将被隐藏
A(Aframe)------(non-hidden area)---------->B(Bframe)------(hidden area)-------->C(Cframe)
怎么做?非常感谢。
// I suppose viewA, viewB, viewC is subviews of self.view
UIView *viewA = ..., *viewB = ..., *viewC = ...;
[self.view bringSubviewToFront:viewA];
[UIView animateWithDuration:0.5 animations:^{
viewA.frame = viewC.frame;
} completion:^(BOOL finished) {
[self.view sendSubviewToBack:viewA];
}];