How to detect iPhone 5 (widescreen devices)?

I’ve just upgraded to Xcode 4.5 GM and found out that you can now apply the ‘4″ Retina’ size to your view controller in the storyboard.

Now if I want to create an application that runs on both iPhone 4 and 5, of course I have to build every window twice, but I also have to detect whether the user has an iPhone with 3.5″ or 4″ screen and then apply the view.

How should I do that?

24 Answers
24

Leave a Comment