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
Post a Comment