CATransform3DMakeRotation hides half the UIView during animation CATransform3DMakeRotation hides half the UIView during animation xcode xcode

CATransform3DMakeRotation hides half the UIView during animation


For the record, the answer was in my comment

imageView.layer.zPosition = -400;

Alternatively you could do

myView.layer.zPosition = 400; // or some number greater than width/2

It looks like part of the rotating view is occluded by the background view. Since it rotates around its center point, part of it passes into negative-z space, so is behind the background.

So from

------- imageView------- myView

to

     / myView    /------- imageView  / /