Is it possible to change the coordinate system in a UIView so that (0,0) will be the top right hand corner?
Share
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.
My answer bars the use of Interface Builder, but I know of no other way.
After initiating the UIView, perform a CGAffineTransform as such:
Check the documentation for CGAffineTransform. You might also have to translate the view a bit, although I believe it should be good.
The “-1” up there inverts the x coordinate system. Whenever you present a new view programmatically, it will work as you hope.
Cheers!