Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone 5 4 inch [duplicate]

Tags:

xcode

ios

Possible Duplicate:
How to detect iPhone 5 (widescreen devices)?

I am creating an app using Xcode. I have noticed that with xcode 4.5, your storyboards can adapt to iphone 5 screen size. If I create two separate storyboards with the different screen sizes, but link the controllers to the same .h file, how can I tell the program which storyboard to load depending on the device?

eg: for the ipad, when I run, it picks the right storyboard automatically

like image 394
Alessandro Avatar asked Sep 20 '12 16:09

Alessandro


People also ask

Which iPhone has a 5.4 inch screen?

iPhones of between 5 and 6 inches are the mid-size ones, though in practice they're almost all more towards the 6-inch end, coming in at either 5.5 inches or 5.8 inches, with the exception being the 5.4-inch iPhone 13 Mini and iPhone 12 Mini.

Are iPhone 5 and 4 the same size?

The iPhone 5 has a modestly larger screen, but because the housing is thinner and lighter than the iPhone 4 and iPhone 4S, the iPhone 5 doesn't really "feel" much bigger overall.

How do I know if my apple is original or duplicate?

Check the notch, the frames, and the camera module very carefully. Most of the latest iPhone models are made of metal and glass, which together give a premium experience. Also, check for the lightning connector on the bottom, since iPhones do not come with USB Type C port like most Android phones these days.


1 Answers

The currently marked answer did not work for me so I created the method below to check if the current device has an 4 inch display.

- (BOOL)hasFourInchDisplay {
    return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568.0);
}

Since that is the known height for the 4 inch display on the iPhone it is a good indicator.

like image 103
Brennan Avatar answered Oct 10 '22 23:10

Brennan