on the ipad, when in portrait(not sure if you call it this) the [[self view] center].x value is in the center – but when in landscape(lying down) it is not the center value.
Any idear?
Thanks
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.
The
centerproperty of a view is relative to itssuperview, which is probably theUIWindowin your case. Since rotation is handled by the view controller and the window actually doesn’t rotate, thecenterof your view stays the same.What you probably want instead is the center of your view’s bounds: