I use UIView animation to resize and translate a view containing multiple subzones. The animation for the parent view is perfect; however, subzones exhibit strange behavior. When the animation begins, the subview changes immediately and then moves to the final position.
For example, if the duration and delay of the animation was five seconds, as soon as the animation was called, the sub-objects would move to the desired values ββat the end of the animation. After five seconds, the supervisor will be changed and transferred to the desired one.
My animation code:
[UIView animateWithDuration:0.5 animations:^{
if (UIDeviceOrientationIsLandscape(self.interfaceOrientation)) {
self.leftPaneView.frame = leftPaneLandscapeFrame;
self.rightPaneContainerView.frame = rightPaneLandscapeFrame;
}
if (UIDeviceOrientationIsPortrait(self.interfaceOrientation)) {
CGFloat offset = 300;
self.leftPaneView.frame = CGRectOffset(leftPanePortraitFrame, -offset, 0);
self.rightPaneContainerView.frame = rightPanePortraitFrame;
}
}];
Any ideas?
. rightPaneContainerView UIViewController, , .