When building a custom frame/view in iOS code, how do you set its rotation behavior?
In UIBuilder you can set the “anchor” points to determine the points of reference to move the object through rotations. How do you do this via code?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll need to include and link against QuartzCore so as to get a definition of CALayer, then you can use its
anchorPointproperty. E.g.UIViews have CALayers, and CALayers are what the OS uses for composition. You can even work directly with CALayers if you want, but UIViews add a bunch of functionality.