I do like this :
CGRect ScreenSize = [[UIScreen mainScreen]bounds];
But result is 480 * 320 in iphone4.
How do I get the resolution of retina display in iphone4?
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 don’t need to.
The OS automatically translates from
320pxx480pxto the retina display.This is because the resolution of the screen isn’t actually higher, it just has a high pixel density (
4pxfor every1pxin <3Gs)The idea is so everything looks sharper/better, not so you can fit more on the screen. (otherwise you would have to double everything’s size, just to be able to see it)
But if you really need to you can use the following