1

Sample project: http://jmp.sh/3jlZTnS

I've got a UIView with an embedded CALayer, that sits on the bottom half of the view.

When I rotate to landscape, it changes to the right position, however during the rotation it stays stays in its relative position, and then falls to the bottom during the animation, which looks really weird.

Here's an image depicting it, where the green is the layer throughout the rotation:

enter image description here

How do I make it stick to the bottom throughout the animation? I've tried changing its anchor point to (0.5, 1) but that doesn't work either.

Doug Smith
  • 29,668
  • 57
  • 204
  • 388
  • Why does the sublayer move at all? Sublayers do not get any kind of automatic layout, so I would expect the sublayer to end up _at the side_ of the rotated view. So _you_ must be doing something with the sublayer — something that you are not telling us about. – matt Apr 02 '16 at 02:18

0 Answers0