objective c - Rotation of UIImageView does not conserve center -


just setting rotation transform uiimageview not keep center still. image translate around de center, i'm puzzled. idea?

  cgaffinetransform   transform = cgaffinetransformidentity;   transform = cgaffinetransformrotate(transform, self.filter.angle);   self.sourceimageview.transform = transform; 

note: angle coupled uislider user changes value -90 90.

i found setting transformation layer fixes issue.

self.sourceimageview.layer.transform = catransform3drotate(catransform3dmakescale(scale, scale, 1.), angle, 0, 0, -1); 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -