Search code examples
ioscgaffinetransformautolayoutcatransform3d

Autolayout rotating Wheel


I'm trying to rotate an UIImageView constraint by it's center with CGAffineTransformRotate but the View jitters around while rotating. If I use CATransform3DRotate to rotate it's layer this doesn't happen, but as soon as I edit the Constraints (changing the Constant) the rotated Image jumps away. Has anybody an Idea how to fix this Issue?

This is a Screenshot of the rotated Image that jumped awayenter image description here


Solution

  • I Just heard Back from the Apple Support Team and they provided a Solution for my Problem by overwriting layoutSubviews of the Superview. This allows to apply special Layout for specific Views. This might not be a perfect solution, but it works like a charm and since Apple suggested it, it should be a good Solution if it comes from the Engeneers that implemented Autolayout

    I added a more complete answer here - a similar Question.