ios - Apply a perspective transform without rotating -
i have been trying perform perspective transform on uiview. have been working example.
however, example applies rotation on view perspective change. there way change perspective of view no rotation? might this:
i have been trying remove rotation, when perspective transform not applied. can't find examples out there deal changing perspective. in advance.
just adding david's answer: output in image have rotate view around x-axis (the horizontal axis) upper edge of view rectangle appears "further away" viewer lower edge, e.g.
catransform3d rotationandperspectivetransform = catransform3didentity; rotationandperspectivetransform.m34 = 1.0 / -200; rotationandperspectivetransform = catransform3drotate(rotationandperspectivetransform, 45.0f * m_pi / 180.0f, 1.0f, 0.0f, 0.0f); layer.transform = rotationandperspectivetransform;
Comments
Post a Comment